mirror of
https://github.com/immich-app/immich.git
synced 2026-07-21 21:34:17 +03:00
Compare commits
2 Commits
renovate/g
...
fix/librar
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65365f3556 | ||
|
|
41a2fa8a44 |
@@ -83,7 +83,7 @@
|
||||
}
|
||||
},
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/docker-in-docker:4": {
|
||||
"ghcr.io/devcontainers/features/docker-in-docker:2": {
|
||||
// https://github.com/devcontainers/features/issues/1466
|
||||
"moby": false
|
||||
}
|
||||
|
||||
2
.github/workflows/auto-close.yml
vendored
2
.github/workflows/auto-close.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
outputs:
|
||||
uses_template: ${{ steps.check.outputs.uses_template }}
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
sparse-checkout: .github/pull_request_template.md
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
14
.github/workflows/build-mobile.yml
vendored
14
.github/workflows/build-mobile.yml
vendored
@@ -87,7 +87,7 @@ jobs:
|
||||
permission-contents: read
|
||||
permission-pull-requests: write
|
||||
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
persist-credentials: false
|
||||
@@ -106,14 +106,14 @@ jobs:
|
||||
working-directory: ./mobile
|
||||
run: printf "%s" $KEY_JKS | base64 -d > android/key.jks
|
||||
|
||||
- uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0
|
||||
- uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5.5.0
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: '17'
|
||||
|
||||
- name: Restore Gradle Cache
|
||||
id: cache-gradle-restore
|
||||
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
uses: actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
@@ -184,7 +184,7 @@ jobs:
|
||||
|
||||
- name: Save Gradle Cache
|
||||
id: cache-gradle-save
|
||||
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
uses: actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
|
||||
if: github.ref == 'refs/heads/main'
|
||||
with:
|
||||
path: |
|
||||
@@ -201,7 +201,7 @@ 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-26
|
||||
runs-on: macos-15
|
||||
|
||||
steps:
|
||||
- id: token
|
||||
@@ -215,7 +215,7 @@ jobs:
|
||||
run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.sha }}
|
||||
persist-credentials: false
|
||||
@@ -241,7 +241,7 @@ jobs:
|
||||
run: flutter build ios --config-only --no-codesign
|
||||
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@003a5c4d8d6321bd302e38f6f0ec593f77f06600 # v1.319.0
|
||||
uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
|
||||
with:
|
||||
ruby-version: '3.3'
|
||||
bundler-cache: true
|
||||
|
||||
2
.github/workflows/cache-cleanup.yml
vendored
2
.github/workflows/cache-cleanup.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
permission-actions: write
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
|
||||
6
.github/workflows/check-openapi.yml
vendored
6
.github/workflows/check-openapi.yml
vendored
@@ -20,12 +20,12 @@ jobs:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Check for breaking API changes
|
||||
uses: oasdiff/oasdiff-action/breaking@024f6c399f9a21ada1addb0f9a36ce1bfac995f1 # v0.1.6
|
||||
uses: oasdiff/oasdiff-action/breaking@291b6594ce617f22f49af5898ee038ed0b46e8fe # v0.1.5
|
||||
with:
|
||||
base: https://raw.githubusercontent.com/${{ github.repository }}/main/open-api/immich-openapi-specs.json
|
||||
revision: open-api/immich-openapi-specs.json
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
|
||||
4
.github/workflows/cli.yml
vendored
4
.github/workflows/cli.yml
vendored
@@ -38,7 +38,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
@@ -71,7 +71,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
|
||||
2
.github/workflows/close-duplicates.yml
vendored
2
.github/workflows/close-duplicates.yml
vendored
@@ -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:d603f5618c1fc9f2b4d506ffed54ba6bcfec83d56b893b5fa8b3f899a402fa0a
|
||||
image: ghcr.io/immich-app/mdq:main@sha256:e3fe456f346b02c2f479462100763aee3ba8245768dfeac3c4262acb068e5c62
|
||||
outputs:
|
||||
checked: ${{ steps.get_checkbox.outputs.checked }}
|
||||
steps:
|
||||
|
||||
8
.github/workflows/codeql-analysis.yml
vendored
8
.github/workflows/codeql-analysis.yml
vendored
@@ -51,14 +51,14 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@7188fc363630916deb702c7fdcf4e481b751f97a # v4.37.1
|
||||
uses: github/codeql-action/init@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
@@ -71,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@7188fc363630916deb702c7fdcf4e481b751f97a # v4.37.1
|
||||
uses: github/codeql-action/autobuild@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
|
||||
|
||||
# ℹ️ 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
|
||||
@@ -84,6 +84,6 @@ jobs:
|
||||
# ./location_of_script_within_repo/buildscript.sh
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@7188fc363630916deb702c7fdcf4e481b751f97a # v4.37.1
|
||||
uses: github/codeql-action/analyze@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
|
||||
with:
|
||||
category: '/language:${{matrix.language}}'
|
||||
|
||||
2
.github/workflows/docs-build.yml
vendored
2
.github/workflows/docs-build.yml
vendored
@@ -62,7 +62,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
|
||||
2
.github/workflows/docs-deploy.yml
vendored
2
.github/workflows/docs-deploy.yml
vendored
@@ -137,7 +137,7 @@ jobs:
|
||||
permission-pull-requests: write
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
|
||||
2
.github/workflows/docs-destroy.yml
vendored
2
.github/workflows/docs-destroy.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
permission-pull-requests: write
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
|
||||
2
.github/workflows/fdroid.yml
vendored
2
.github/workflows/fdroid.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout pubspec for versionCode
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
ref: ${{ github.event.release.tag_name }}
|
||||
persist-credentials: false
|
||||
|
||||
2
.github/workflows/fix-format.yml
vendored
2
.github/workflows/fix-format.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
permission-pull-requests: write
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
persist-credentials: true
|
||||
|
||||
6
.github/workflows/prepare-release.yml
vendored
6
.github/workflows/prepare-release.yml
vendored
@@ -61,7 +61,7 @@ jobs:
|
||||
permission-contents: write
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
persist-credentials: true
|
||||
@@ -140,7 +140,7 @@ jobs:
|
||||
permission-actions: read
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
persist-credentials: false
|
||||
@@ -152,7 +152,7 @@ jobs:
|
||||
github-token: ${{ steps.generate-token.outputs.token }}
|
||||
|
||||
- name: Create draft release
|
||||
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
|
||||
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1
|
||||
with:
|
||||
draft: true
|
||||
prerelease: ${{ needs.bump_version.outputs.rc }}
|
||||
|
||||
2
.github/workflows/sdk.yml
vendored
2
.github/workflows/sdk.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
|
||||
2
.github/workflows/static_analysis.yml
vendored
2
.github/workflows/static_analysis.yml
vendored
@@ -58,7 +58,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
|
||||
38
.github/workflows/test.yml
vendored
38
.github/workflows/test.yml
vendored
@@ -85,7 +85,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
@@ -114,7 +114,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
@@ -146,7 +146,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
@@ -178,7 +178,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
@@ -223,7 +223,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
@@ -262,7 +262,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
@@ -291,7 +291,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
@@ -342,7 +342,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
@@ -375,7 +375,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
submodules: 'recursive'
|
||||
@@ -412,7 +412,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
submodules: 'recursive'
|
||||
@@ -422,7 +422,7 @@ jobs:
|
||||
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'pnpm'
|
||||
@@ -490,7 +490,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
submodules: 'recursive'
|
||||
@@ -500,7 +500,7 @@ jobs:
|
||||
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'pnpm'
|
||||
@@ -598,7 +598,7 @@ jobs:
|
||||
private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }}
|
||||
permission-contents: read
|
||||
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
@@ -637,7 +637,7 @@ jobs:
|
||||
private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }}
|
||||
permission-contents: read
|
||||
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
@@ -669,7 +669,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
@@ -699,7 +699,7 @@ jobs:
|
||||
private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }}
|
||||
permission-contents: read
|
||||
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
@@ -722,7 +722,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
@@ -781,7 +781,7 @@ jobs:
|
||||
permission-contents: read
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
|
||||
38
.vscode/settings.json
vendored
38
.vscode/settings.json
vendored
@@ -29,6 +29,9 @@
|
||||
"editor.formatOnSave": true,
|
||||
"tailwindCSS.lint.suggestCanonicalClasses": "ignore"
|
||||
},
|
||||
"svelte.plugin.svelte.compilerWarnings": {
|
||||
"state_referenced_locally": "ignore"
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true
|
||||
@@ -40,40 +43,37 @@
|
||||
"eslint.useFlatConfig": true,
|
||||
"eslint.validate": ["javascript", "typescript", "svelte"],
|
||||
"eslint.workingDirectories": [
|
||||
{ "changeProcessCWD": true, "directory": "cli" },
|
||||
{ "changeProcessCWD": true, "directory": "e2e" },
|
||||
{ "changeProcessCWD": true, "directory": "server" },
|
||||
{ "changeProcessCWD": true, "directory": "web" }
|
||||
{ "directory": "cli", "changeProcessCWD": true },
|
||||
{ "directory": "e2e", "changeProcessCWD": true },
|
||||
{ "directory": "server", "changeProcessCWD": true },
|
||||
{ "directory": "web", "changeProcessCWD": true }
|
||||
],
|
||||
"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",
|
||||
"*.js": "${capture}.spec.js,${capture}.mock.js",
|
||||
"*.ts": "${capture}.spec.ts,${capture}.mock.ts",
|
||||
"*.js": "${capture}.spec.js,${capture}.mock.js",
|
||||
"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
|
||||
},
|
||||
"js/ts.preferences.importModuleSpecifier": "non-relative",
|
||||
"search.exclude": {
|
||||
"**/.svelte-kit": true,
|
||||
"**/node_modules": true,
|
||||
"**/build": true,
|
||||
"**/dist": true,
|
||||
"**/node_modules": true,
|
||||
"**/.svelte-kit": 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
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
<a href="readme_i18n/README_zh_TW.md">正體中文</a>
|
||||
<a href="readme_i18n/README_uk_UA.md">Українська</a>
|
||||
<a href="readme_i18n/README_ru_RU.md">Русский</a>
|
||||
<a href="readme_i18n/README_bg_BG.md">Български</a>
|
||||
<a href="readme_i18n/README_pt_BR.md">Português Brasileiro</a>
|
||||
<a href="readme_i18n/README_sv_SE.md">Svenska</a>
|
||||
<a href="readme_i18n/README_ar_JO.md">العربية</a>
|
||||
|
||||
@@ -154,7 +154,7 @@ services:
|
||||
|
||||
redis:
|
||||
container_name: immich_redis
|
||||
image: docker.io/valkey/valkey:9@sha256:8e8d64b405ce18f41b8e5ee20aa4687a8ed0022d1298f2ce31cdcf3a76e09411
|
||||
image: docker.io/valkey/valkey:9@sha256:4963247afc4cd33c7d3b2d2816b9f7f8eeebab148d29056c2ca4d7cbc966f2d9
|
||||
healthcheck:
|
||||
test: redis-cli ping || exit 1
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ services:
|
||||
|
||||
redis:
|
||||
container_name: immich_redis
|
||||
image: docker.io/valkey/valkey:9@sha256:8e8d64b405ce18f41b8e5ee20aa4687a8ed0022d1298f2ce31cdcf3a76e09411
|
||||
image: docker.io/valkey/valkey:9@sha256:4963247afc4cd33c7d3b2d2816b9f7f8eeebab148d29056c2ca4d7cbc966f2d9
|
||||
healthcheck:
|
||||
test: redis-cli ping || exit 1
|
||||
restart: always
|
||||
|
||||
@@ -61,7 +61,7 @@ services:
|
||||
|
||||
redis:
|
||||
container_name: immich_redis
|
||||
image: docker.io/valkey/valkey:9@sha256:8e8d64b405ce18f41b8e5ee20aa4687a8ed0022d1298f2ce31cdcf3a76e09411
|
||||
image: docker.io/valkey/valkey:9@sha256:4963247afc4cd33c7d3b2d2816b9f7f8eeebab148d29056c2ca4d7cbc966f2d9
|
||||
user: '1000:1000'
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
@@ -49,7 +49,7 @@ services:
|
||||
|
||||
redis:
|
||||
container_name: immich_redis
|
||||
image: docker.io/valkey/valkey:9@sha256:8e8d64b405ce18f41b8e5ee20aa4687a8ed0022d1298f2ce31cdcf3a76e09411
|
||||
image: docker.io/valkey/valkey:9@sha256:4963247afc4cd33c7d3b2d2816b9f7f8eeebab148d29056c2ca4d7cbc966f2d9
|
||||
healthcheck:
|
||||
test: redis-cli ping || exit 1
|
||||
restart: always
|
||||
|
||||
@@ -28,4 +28,4 @@ run = "prettier --write ."
|
||||
run = "wrangler pages deploy build --project-name=${PROJECT_NAME} --branch=${BRANCH_NAME}"
|
||||
|
||||
[tools]
|
||||
wrangler = "4.111.0"
|
||||
wrangler = "4.110.0"
|
||||
|
||||
@@ -40,8 +40,7 @@
|
||||
"@docusaurus/tsconfig": "^3.10.0",
|
||||
"@docusaurus/types": "^3.10.0",
|
||||
"prettier": "^3.7.4",
|
||||
"@typescript/native": "npm:typescript@^7.0.2",
|
||||
"typescript": "npm:@typescript/typescript6@^6.0.2"
|
||||
"typescript": "^6.0.0"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
|
||||
@@ -45,7 +45,7 @@ services:
|
||||
|
||||
redis:
|
||||
container_name: immich-e2e-redis
|
||||
image: docker.io/valkey/valkey:9@sha256:8e8d64b405ce18f41b8e5ee20aa4687a8ed0022d1298f2ce31cdcf3a76e09411
|
||||
image: docker.io/valkey/valkey:9@sha256:4963247afc4cd33c7d3b2d2816b9f7f8eeebab148d29056c2ca4d7cbc966f2d9
|
||||
healthcheck:
|
||||
test: redis-cli ping || exit 1
|
||||
|
||||
|
||||
@@ -41,18 +41,9 @@ 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/name-replacements': 'off',
|
||||
'unicorn/prevent-abbreviations': 'off',
|
||||
'unicorn/filename-case': 'off',
|
||||
'unicorn/no-null': 'off',
|
||||
'unicorn/prefer-top-level-await': 'off',
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
"eslint": "^10.0.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-unicorn": "^72.0.0",
|
||||
"eslint-plugin-unicorn": "^64.0.0",
|
||||
"exiftool-vendored": "^35.0.0",
|
||||
"globals": "^17.0.0",
|
||||
"luxon": "^3.4.4",
|
||||
@@ -51,8 +51,7 @@
|
||||
"sharp": "^0.34.5",
|
||||
"socket.io-client": "^4.7.4",
|
||||
"supertest": "^7.0.0",
|
||||
"@typescript/native": "npm:typescript@^7.0.2",
|
||||
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
||||
"typescript": "^6.0.0",
|
||||
"typescript-eslint": "^8.28.0",
|
||||
"utimes": "^5.2.1",
|
||||
"vitest": "^4.0.0"
|
||||
|
||||
@@ -118,7 +118,7 @@ describe('/admin/database-backups', () => {
|
||||
|
||||
expect(status).toBe(201);
|
||||
|
||||
cookie = headers['set-cookie'][0].split(';', 1)[0];
|
||||
cookie = headers['set-cookie'][0].split(';')[0];
|
||||
|
||||
await expect
|
||||
.poll(
|
||||
@@ -224,7 +224,7 @@ describe('/admin/database-backups', () => {
|
||||
});
|
||||
|
||||
expect(status).toBe(201);
|
||||
cookie = headers['set-cookie'][0].split(';', 1)[0];
|
||||
cookie = headers['set-cookie'][0].split(';')[0];
|
||||
|
||||
await expect
|
||||
.poll(
|
||||
@@ -295,7 +295,7 @@ describe('/admin/database-backups', () => {
|
||||
});
|
||||
|
||||
expect(status).toBe(201);
|
||||
cookie = headers['set-cookie'][0].split(';', 1)[0];
|
||||
cookie = headers['set-cookie'][0].split(';')[0];
|
||||
|
||||
await expect
|
||||
.poll(
|
||||
|
||||
@@ -85,7 +85,7 @@ describe('/admin/maintenance', () => {
|
||||
|
||||
expect(status).toBe(201);
|
||||
|
||||
cookie = headers['set-cookie'][0].split(';', 1)[0];
|
||||
cookie = headers['set-cookie'][0].split(';')[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('=', 2)[1].trim(),
|
||||
token: cookie!.split('=')[1].trim(),
|
||||
});
|
||||
expect(status).toBe(201);
|
||||
expect(body).toEqual(
|
||||
|
||||
@@ -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(';', 1)[0].split('='))
|
||||
?.map((cookie) => cookie.split(';')[0].split('='))
|
||||
?.find(([name]) => name === 'immich_maintenance_token');
|
||||
|
||||
expect(cookie).toBeTruthy();
|
||||
|
||||
@@ -120,7 +120,6 @@ 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) }),
|
||||
|
||||
@@ -781,7 +781,7 @@ describe('/asset', () => {
|
||||
exifImageWidth: 4032,
|
||||
exifImageHeight: 3024,
|
||||
latitude: 41.2203,
|
||||
longitude: -96.071625,
|
||||
longitude: -96.071_625,
|
||||
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.61324,
|
||||
latitude: 36.613_24,
|
||||
lensModel: '18.3mm F2.8',
|
||||
longitude: -121.89785,
|
||||
longitude: -121.897_85,
|
||||
make: 'RICOH IMAGING COMPANY, LTD.',
|
||||
model: 'RICOH GR III',
|
||||
orientation: '1',
|
||||
|
||||
@@ -75,7 +75,7 @@ describe('/map', () => {
|
||||
country: 'United States of America',
|
||||
id: expect.any(String),
|
||||
lat: expect.closeTo(39.115),
|
||||
lon: expect.closeTo(-108.400968),
|
||||
lon: expect.closeTo(-108.400_968),
|
||||
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.071625),
|
||||
lon: expect.closeTo(-96.071_625),
|
||||
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.400968),
|
||||
lon: expect.closeTo(-108.400_968),
|
||||
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.071625),
|
||||
lon: expect.closeTo(-96.071_625),
|
||||
state: 'Nebraska',
|
||||
},
|
||||
]);
|
||||
@@ -188,20 +188,20 @@ describe('/map', () => {
|
||||
const reverseGeocodeTestCases = [
|
||||
{
|
||||
name: 'Vaucluse',
|
||||
lat: -33.85897705866313,
|
||||
lon: 151.27849073027048,
|
||||
lat: -33.858_977_058_663_13,
|
||||
lon: 151.278_490_730_270_48,
|
||||
results: [{ city: 'Vaucluse', state: 'New South Wales', country: 'Australia' }],
|
||||
},
|
||||
{
|
||||
name: 'Ravenhall',
|
||||
lat: -37.76573239917475,
|
||||
lon: 144.7524531648833,
|
||||
lat: -37.765_732_399_174_75,
|
||||
lon: 144.752_453_164_883_3,
|
||||
results: [{ city: 'Ravenhall', state: 'Victoria', country: 'Australia' }],
|
||||
},
|
||||
{
|
||||
name: 'Scarborough',
|
||||
lat: -31.894346156789997,
|
||||
lon: 115.75761710390464,
|
||||
lat: -31.894_346_156_789_997,
|
||||
lon: 115.757_617_103_904_64,
|
||||
results: [{ city: 'Scarborough', state: 'Western Australia', country: 'Australia' }],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -87,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.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: 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: 38.9711, longitude: -109.7137 }, // thompson springs
|
||||
{ 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: 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: 0, longitude: 0 }, // null island
|
||||
];
|
||||
|
||||
@@ -112,7 +112,7 @@ describe('/search', () => {
|
||||
);
|
||||
|
||||
await Promise.all(updates);
|
||||
for (const i of coordinates.keys()) {
|
||||
for (const [i] of coordinates.entries()) {
|
||||
await utils.waitForWebsocketEvent({ event: 'assetUpdate', id: assets[i].id });
|
||||
}
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -119,9 +119,7 @@ describe(`immich upload`, () => {
|
||||
const baseDir = `/tmp/upload/`;
|
||||
|
||||
const testPaths = Object.keys(files).map((filePath) => `${baseDir}/${filePath}`);
|
||||
for (const filePath of testPaths) {
|
||||
utils.createImageFile(filePath);
|
||||
}
|
||||
testPaths.map((filePath) => utils.createImageFile(filePath));
|
||||
|
||||
const commandLine = paths.map((argument) => `${baseDir}/${argument}`);
|
||||
|
||||
@@ -137,9 +135,7 @@ describe(`immich upload`, () => {
|
||||
const assets = await getAssetStatistics({}, { headers: asKeyAuth(key) });
|
||||
expect(assets.total).toBe(expectedCount);
|
||||
|
||||
for (const filePath of testPaths) {
|
||||
utils.removeImageFile(filePath);
|
||||
}
|
||||
testPaths.map((filePath) => utils.removeImageFile(filePath));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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; // Convert to 32bit integer
|
||||
seedNumber = seedNumber & seedNumber; // Convert to 32bit integer
|
||||
}
|
||||
return randomImage(new SeededRandom(Math.abs(seedNumber)), { width, height });
|
||||
};
|
||||
|
||||
@@ -64,7 +64,7 @@ export function generateAsset(
|
||||
const asset: MockTimelineAsset = {
|
||||
id: assetId,
|
||||
ownerId,
|
||||
ratio: Number(ratio.split(':', 1)[0]) / Number(ratio.split(':', 2)[1]),
|
||||
ratio: Number.parseFloat(ratio.split(':')[0]) / Number.parseFloat(ratio.split(':')[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().toArray().flat();
|
||||
const allAssets = [...buckets.values()].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));
|
||||
|
||||
@@ -172,7 +172,11 @@ function shouldIncludeAsset(
|
||||
if (isArchived !== undefined && actuallyArchived !== isArchived) {
|
||||
return false;
|
||||
}
|
||||
return isFavorite === undefined || actuallyFavorited === isFavorite;
|
||||
if (isFavorite !== undefined && actuallyFavorited !== isFavorite) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Get summary for all buckets (mimics getTimeBuckets API)
|
||||
@@ -357,7 +361,7 @@ export function getAsset(
|
||||
owner?: UserResponseDto,
|
||||
): AssetResponseDto | undefined {
|
||||
// Search through all buckets for the asset
|
||||
const buckets = timelineData.buckets.values().toArray();
|
||||
const buckets = [...timelineData.buckets.values()];
|
||||
for (const assets of buckets) {
|
||||
const asset = assets.find((a) => a.id === assetId);
|
||||
if (asset) {
|
||||
@@ -391,7 +395,7 @@ export function getAlbum(
|
||||
|
||||
// Get the actual asset objects from the timeline data
|
||||
const albumAssets: AssetResponseDto[] = [];
|
||||
const allAssets = timelineData.buckets.values().toArray().flat();
|
||||
const allAssets = [...timelineData.buckets.values()].flat();
|
||||
|
||||
for (const assetId of album.assetIds) {
|
||||
const assetConfig = allAssets.find((a) => a.id === assetId);
|
||||
|
||||
@@ -143,7 +143,7 @@ export function validateTimelineConfig(config: TimelineConfig): void {
|
||||
}
|
||||
|
||||
// Validate seed if provided
|
||||
if (config.seed !== undefined && (config.seed < 0 || !Number.isSafeInteger(config.seed))) {
|
||||
if (config.seed !== undefined && (config.seed < 0 || !Number.isInteger(config.seed))) {
|
||||
throw new Error('Seed must be a non-negative integer');
|
||||
}
|
||||
|
||||
|
||||
@@ -153,8 +153,11 @@ 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') {
|
||||
|
||||
@@ -40,8 +40,7 @@ export const setupTimelineMockApiRoutes = async (
|
||||
contentType: 'application/json',
|
||||
json: getTimeBuckets(timelineRestData, isTrashed, isArchived, isFavorite, albumId, changes),
|
||||
});
|
||||
}
|
||||
if (pathname === '/api/timeline/bucket') {
|
||||
} else if (pathname === '/api/timeline/bucket') {
|
||||
const timeBucket = url.searchParams.get('timeBucket');
|
||||
if (!timeBucket) {
|
||||
return route.continue();
|
||||
|
||||
@@ -38,7 +38,7 @@ test.describe('asset-viewer', () => {
|
||||
assets.push(...timeBucket);
|
||||
}
|
||||
for (const yearMonth of timelineRestData.buckets.keys()) {
|
||||
const [year, month] = yearMonth.split('-', 2);
|
||||
const [year, month] = yearMonth.split('-');
|
||||
yearMonths.push(`${year}-${Number(month)}`);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable unicorn/no-this-outside-of-class */
|
||||
import type { AssetResponseDto } from '@immich/sdk';
|
||||
import { expect, Page } from '@playwright/test';
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ test.describe('Timeline', () => {
|
||||
assets.push(...timeBucket);
|
||||
}
|
||||
for (const yearMonth of timelineRestData.buckets.keys()) {
|
||||
const [year, month] = yearMonth.split('-', 2);
|
||||
const [year, month] = yearMonth.split('-');
|
||||
yearMonths.push(`${year}-${Number(month)}`);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@ export const sleep = (ms: number) => {
|
||||
};
|
||||
|
||||
export const padYearMonth = (yearMonth: string) => {
|
||||
const [year, month] = yearMonth.split('-', 2);
|
||||
const [year, month] = yearMonth.split('-');
|
||||
return `${year}-${month.padStart(2, '0')}`;
|
||||
};
|
||||
|
||||
@@ -72,7 +72,6 @@ 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) {
|
||||
@@ -152,7 +151,6 @@ 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);
|
||||
@@ -179,7 +177,6 @@ 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);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable unicorn/no-top-level-assignment-in-function */
|
||||
import {
|
||||
AssetMediaCreateDto,
|
||||
AssetMediaResponseDto,
|
||||
@@ -178,7 +177,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',
|
||||
@@ -305,7 +304,7 @@ export const utils = {
|
||||
},
|
||||
|
||||
adminSetup: async (options?: AdminSetupOptions) => {
|
||||
options ||= { onboarding: true };
|
||||
options = options || { onboarding: true };
|
||||
|
||||
await signUpAdmin({ signUpDto: signupDto.admin });
|
||||
const response = await login({ loginCredentialDto: loginDto.admin });
|
||||
@@ -546,7 +545,6 @@ export const utils = {
|
||||
{
|
||||
headers: asBearerAuth(accessToken),
|
||||
fetch: (...args: Parameters<typeof fetch>) =>
|
||||
// eslint-disable-next-line unicorn/no-invalid-argument-count, unicorn/prefer-await
|
||||
fetch(...args).then((response) => {
|
||||
setCookie = response.headers.getSetCookie();
|
||||
return response;
|
||||
@@ -676,7 +674,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;
|
||||
},
|
||||
|
||||
@@ -708,7 +706,6 @@ export const utils = {
|
||||
},
|
||||
};
|
||||
|
||||
// eslint-disable-next-line unicorn/no-top-level-side-effects
|
||||
utils.initSdk();
|
||||
|
||||
if (!existsSync(`${testAssetDir}/albums`)) {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"resolveJsonModule": true,
|
||||
"target": "es2023",
|
||||
"lib": ["dom", "ESNext"],
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"incremental": true,
|
||||
|
||||
38
mise.lock
38
mise.lock
@@ -287,43 +287,43 @@ url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.
|
||||
url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/391536406"
|
||||
|
||||
[[tools.pnpm]]
|
||||
version = "11.13.1"
|
||||
version = "11.11.0"
|
||||
backend = "aqua:pnpm/pnpm"
|
||||
|
||||
[tools.pnpm."platforms.linux-arm64"]
|
||||
checksum = "sha256:b52db99d215ed7dc9563aed815953c62a6c1ffd7cd75803d3a07ad7e4f246aed"
|
||||
url = "https://github.com/pnpm/pnpm/releases/download/v11.13.1/pnpm-linux-arm64.tar.gz"
|
||||
url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/478563983"
|
||||
checksum = "sha256:4871093439f036b3082df6102255ac119f3b6f4f50c51c5711fc7c358b8b22d7"
|
||||
url = "https://github.com/pnpm/pnpm/releases/download/v11.11.0/pnpm-linux-arm64.tar.gz"
|
||||
url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/471734816"
|
||||
provenance = "github-attestations"
|
||||
|
||||
[tools.pnpm."platforms.linux-arm64-musl"]
|
||||
checksum = "sha256:2cadd4fc815c591f498a0a84c9e74a836e3e8c1236275f6e1cfd355bae6ae957"
|
||||
url = "https://github.com/pnpm/pnpm/releases/download/v11.13.1/pnpm-linux-arm64-musl.tar.gz"
|
||||
url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/478563985"
|
||||
checksum = "sha256:f97316cee0deb3ae3fd64e8a09e1c8c88a76da33373a2b465bd6a4c3e85e0690"
|
||||
url = "https://github.com/pnpm/pnpm/releases/download/v11.11.0/pnpm-linux-arm64-musl.tar.gz"
|
||||
url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/471734819"
|
||||
provenance = "github-attestations"
|
||||
|
||||
[tools.pnpm."platforms.linux-x64"]
|
||||
checksum = "sha256:bd6d4b0e14536207ad76bc838f5980cecd968da15f69aae0b207380cca3f2e98"
|
||||
url = "https://github.com/pnpm/pnpm/releases/download/v11.13.1/pnpm-linux-x64.tar.gz"
|
||||
url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/478563986"
|
||||
checksum = "sha256:df4699e897012ab14df2cc6eaa942910e830eb7fcaa420a2a1421a9461fd9108"
|
||||
url = "https://github.com/pnpm/pnpm/releases/download/v11.11.0/pnpm-linux-x64.tar.gz"
|
||||
url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/471734818"
|
||||
provenance = "github-attestations"
|
||||
|
||||
[tools.pnpm."platforms.linux-x64-musl"]
|
||||
checksum = "sha256:ba19690f4ed1b64f1203ade14e9216352b46232d5582468b26a0160e0c9618c5"
|
||||
url = "https://github.com/pnpm/pnpm/releases/download/v11.13.1/pnpm-linux-x64-musl.tar.gz"
|
||||
url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/478563980"
|
||||
checksum = "sha256:aad186f8a8ae72d827d5efe63e99e801456715fb7f2798949405fa33f20260db"
|
||||
url = "https://github.com/pnpm/pnpm/releases/download/v11.11.0/pnpm-linux-x64-musl.tar.gz"
|
||||
url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/471734821"
|
||||
provenance = "github-attestations"
|
||||
|
||||
[tools.pnpm."platforms.macos-arm64"]
|
||||
checksum = "sha256:765c2bf04e8129cb58c0f946e324262e418370b35a203b50b1f06a0567ef8bc1"
|
||||
url = "https://github.com/pnpm/pnpm/releases/download/v11.13.1/pnpm-darwin-arm64.tar.gz"
|
||||
url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/478563984"
|
||||
checksum = "sha256:ad46ad16c2376c2b78354ac488c1b166e076aa59bfcbcfd567d55957d755a690"
|
||||
url = "https://github.com/pnpm/pnpm/releases/download/v11.11.0/pnpm-darwin-arm64.tar.gz"
|
||||
url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/471734814"
|
||||
provenance = "github-attestations"
|
||||
|
||||
[tools.pnpm."platforms.windows-x64"]
|
||||
checksum = "sha256:d8bebbc71df2702961c1d34a5e61196bc0aa3bbde33c33253f6afa3dd4546a6d"
|
||||
url = "https://github.com/pnpm/pnpm/releases/download/v11.13.1/pnpm-win32-x64.zip"
|
||||
url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/478563981"
|
||||
checksum = "sha256:13ad8a9b139c4c829fea33462cf04d061d72f0926b2b76a92ac03c9a36e405f9"
|
||||
url = "https://github.com/pnpm/pnpm/releases/download/v11.11.0/pnpm-win32-x64.zip"
|
||||
url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/471734820"
|
||||
provenance = "github-attestations"
|
||||
|
||||
[[tools.terragrunt]]
|
||||
|
||||
@@ -16,7 +16,7 @@ config_roots = [
|
||||
|
||||
[tools]
|
||||
node = "24.15.0"
|
||||
pnpm = "11.13.1"
|
||||
pnpm = "11.11.0"
|
||||
terragrunt = "1.0.3"
|
||||
opentofu = "1.11.6"
|
||||
"npm:oazapfts" = "7.5.0"
|
||||
|
||||
@@ -23,6 +23,6 @@ class ImmichApp : Application() {
|
||||
// as the previous start might have been killed without unlocking.
|
||||
if (BackgroundEngineLock.connectEngines > 0) return@postDelayed
|
||||
BackgroundWorkerApiImpl.enqueueBackgroundWorker(this)
|
||||
}, 15000)
|
||||
}, 5000)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ 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
|
||||
@@ -62,11 +61,6 @@ class BackgroundWorker(context: Context, params: WorkerParameters) :
|
||||
}
|
||||
|
||||
override fun startWork(): ListenableFuture<Result> {
|
||||
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()) {
|
||||
@@ -83,10 +77,6 @@ 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!!)
|
||||
|
||||
@@ -153,17 +143,11 @@ 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 {
|
||||
api.cancel {
|
||||
complete(Result.failure())
|
||||
if (flutterApi != null) {
|
||||
flutterApi?.cancel {
|
||||
complete(Result.failure())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ void main() {
|
||||
|
||||
void sendUser(SyncStream stream, String id, String name) {
|
||||
stream.send(
|
||||
type: SyncEntityType.userV1.toString(),
|
||||
type: SyncEntityType.userV1.value,
|
||||
data: SyncUserV1(
|
||||
id: id,
|
||||
name: name,
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/maplibre/maplibre-gl-native-distribution.git",
|
||||
"state" : {
|
||||
"revision" : "84a79bc375a301169390ac110c868f06c857b83f",
|
||||
"version" : "6.27.0"
|
||||
"revision" : "60d9bb85c94ce6e7fc4406cd32529fd12bdb7809",
|
||||
"version" : "6.14.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -328,6 +328,8 @@ class SyncStreamService {
|
||||
return _syncStreamRepository.updateAssetOcrV1(data.cast());
|
||||
case SyncEntityType.assetOcrDeleteV1:
|
||||
return _syncStreamRepository.deleteAssetOcrV1(data.cast());
|
||||
default:
|
||||
_logger.warning("Unknown sync data type: $type");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,8 +85,12 @@ class TimelineFactory {
|
||||
TimelineService fromAssetsWithBuckets(List<BaseAsset> assets, TimelineOrigin type) =>
|
||||
TimelineService(_timelineRepository.fromAssetsWithBuckets(assets, type));
|
||||
|
||||
TimelineService map(List<String> userIds, TimelineMapOptions options) =>
|
||||
TimelineService(_timelineRepository.map(userIds, options, groupBy));
|
||||
/// Creates a TimelineService for serving geographical map queries, such assets within bounded locations
|
||||
TimelineService geographicMap(
|
||||
List<String> userIds,
|
||||
TimelineMapOptions Function() currentOptions,
|
||||
Stream<TimelineMapOptions> optionsStream,
|
||||
) => TimelineService(_timelineRepository.geographicMap(userIds, currentOptions, optionsStream, groupBy));
|
||||
}
|
||||
|
||||
class TimelineService {
|
||||
|
||||
@@ -58,6 +58,7 @@ extension on api.AssetVisibility {
|
||||
api.AssetVisibility.hidden => AssetVisibility.hidden,
|
||||
api.AssetVisibility.archive => AssetVisibility.archive,
|
||||
api.AssetVisibility.locked => AssetVisibility.locked,
|
||||
_ => AssetVisibility.timeline,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -67,5 +68,6 @@ 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'),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -210,19 +210,17 @@ 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<Object?> instead of
|
||||
// List<String>
|
||||
await _db.batch((batch) async {
|
||||
assetAlbums.cast<String, List<Object?>>().forEach((assetId, albumIds) {
|
||||
for (final albumId in albumIds.cast<String?>().nonNulls) {
|
||||
batch.deleteWhere(_db.localAlbumAssetEntity, (f) => f.albumId.equals(albumId) & f.assetId.equals(assetId));
|
||||
}
|
||||
});
|
||||
});
|
||||
await _db.batch((batch) async {
|
||||
assetAlbums.cast<String, List<Object?>>().forEach((assetId, albumIds) {
|
||||
batch.insertAll(
|
||||
|
||||
@@ -937,6 +937,7 @@ extension on AssetTypeEnum {
|
||||
AssetTypeEnum.VIDEO => AssetType.video,
|
||||
AssetTypeEnum.AUDIO => AssetType.audio,
|
||||
AssetTypeEnum.OTHER => AssetType.other,
|
||||
_ => throw Exception('Unknown AssetType value: $this'),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -944,12 +945,14 @@ 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'),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -958,6 +961,7 @@ 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'),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -967,6 +971,7 @@ 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'),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -975,11 +980,12 @@ 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 == toString());
|
||||
AvatarColor? toAvatarColor() => AvatarColor.values.firstWhereOrNull((c) => c.name == value);
|
||||
}
|
||||
|
||||
extension on api.AssetEditAction {
|
||||
@@ -987,5 +993,6 @@ extension on api.AssetEditAction {
|
||||
api.AssetEditAction.crop => AssetEditAction.crop,
|
||||
api.AssetEditAction.rotate => AssetEditAction.rotate,
|
||||
api.AssetEditAction.mirror => AssetEditAction.mirror,
|
||||
_ => AssetEditAction.other,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -508,9 +508,21 @@ class DriftTimelineRepository extends DriftDatabaseRepository {
|
||||
return query.map((row) => row.toDto()).get();
|
||||
}
|
||||
|
||||
TimelineQuery map(List<String> userIds, TimelineMapOptions options, GroupAssetsBy groupBy) => (
|
||||
bucketSource: () => _watchMapBucket(userIds, options, groupBy: groupBy),
|
||||
assetSource: (offset, count) => _getMapBucketAssets(userIds, options, offset: offset, count: count),
|
||||
/// Creates a geographic map query that can dynamically filter on changing [TimelineMapOptions]
|
||||
/// (most notably the active map bounds)
|
||||
TimelineQuery geographicMap(
|
||||
List<String> userIds,
|
||||
TimelineMapOptions Function() currentOptions,
|
||||
Stream<TimelineMapOptions> optionsStream,
|
||||
GroupAssetsBy groupBy,
|
||||
) => (
|
||||
bucketSource: () => Stream.value(currentOptions())
|
||||
.followedBy(optionsStream)
|
||||
.switchMap(
|
||||
// Any error would kill the stream for all options; make sure the stream stays alive
|
||||
(options) => _watchMapBucket(userIds, options, groupBy: groupBy).handleError((_) {}),
|
||||
),
|
||||
assetSource: (offset, count) => _getMapBucketAssets(userIds, currentOptions(), offset: offset, count: count),
|
||||
origin: TimelineOrigin.map,
|
||||
);
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ class _DriftCreateAlbumPageState extends ConsumerState<DriftCreateAlbumPage> {
|
||||
FocusNode albumTitleTextFieldFocusNode = FocusNode();
|
||||
FocusNode albumDescriptionTextFieldFocusNode = FocusNode();
|
||||
bool isAlbumTitleTextFieldFocus = false;
|
||||
bool isCreatingAlbum = false;
|
||||
Set<BaseAsset> selectedAssets = {};
|
||||
|
||||
@override
|
||||
@@ -49,7 +48,7 @@ class _DriftCreateAlbumPageState extends ConsumerState<DriftCreateAlbumPage> {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
bool get _canCreateAlbum => albumTitleController.text.trim().isNotEmpty && !isCreatingAlbum;
|
||||
bool get _canCreateAlbum => albumTitleController.text.trim().isNotEmpty;
|
||||
|
||||
String _getEffectiveTitle() {
|
||||
return albumTitleController.text.isNotEmpty
|
||||
@@ -168,12 +167,7 @@ class _DriftCreateAlbumPageState extends ConsumerState<DriftCreateAlbumPage> {
|
||||
}
|
||||
|
||||
Future<void> createAlbum() async {
|
||||
if (isCreatingAlbum) {
|
||||
return;
|
||||
}
|
||||
|
||||
onBackgroundTapped();
|
||||
setState(() => isCreatingAlbum = true);
|
||||
|
||||
final title = _getEffectiveTitle().trim();
|
||||
|
||||
@@ -193,10 +187,6 @@ class _DriftCreateAlbumPageState extends ConsumerState<DriftCreateAlbumPage> {
|
||||
if (context.mounted) {
|
||||
ImmichToast.show(context: context, toastType: ToastType.error, msg: 'errors.failed_to_create_album'.t());
|
||||
}
|
||||
} finally {
|
||||
if (mounted) {
|
||||
setState(() => isCreatingAlbum = false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -174,12 +174,6 @@ class _AssetViewerState extends ConsumerState<AssetViewer> {
|
||||
return;
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
AssetViewer._setAsset(ref, asset);
|
||||
_preloader.preload(index, context.sizeData);
|
||||
_handleCasting();
|
||||
|
||||
@@ -35,7 +35,6 @@ class _ScopedMapTimeline extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// TODO: this causes the timeline to switch to flicker to "loading" state and back. This is both janky and inefficient.
|
||||
return ProviderScope(
|
||||
overrides: [
|
||||
timelineServiceProvider.overrideWith((ref) {
|
||||
@@ -44,13 +43,16 @@ class _ScopedMapTimeline extends StatelessWidget {
|
||||
throw Exception('User must be logged in to access archive');
|
||||
}
|
||||
|
||||
final users = ref.watch(mapStateProvider).withPartners
|
||||
? ref.watch(timelineUsersProvider).valueOrNull ?? [user.id]
|
||||
: [user.id];
|
||||
final withPartners = ref.watch(mapStateProvider.select((s) => s.withPartners));
|
||||
final users = withPartners ? ref.watch(timelineUsersProvider).valueOrNull ?? [user.id] : [user.id];
|
||||
|
||||
final timelineService = ref
|
||||
.watch(timelineFactoryProvider)
|
||||
.map(users, ref.watch(mapStateProvider).toOptions());
|
||||
.geographicMap(
|
||||
users,
|
||||
() => ref.read(mapStateProvider).toOptions(),
|
||||
ref.read(mapStateProvider.notifier).optionsStream,
|
||||
);
|
||||
ref.onDispose(timelineService.dispose);
|
||||
return timelineService;
|
||||
}),
|
||||
|
||||
@@ -1,76 +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/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/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 ConsumerStatefulWidget {
|
||||
class PartnerDetailBottomSheet extends ConsumerWidget {
|
||||
const PartnerDetailBottomSheet({super.key});
|
||||
|
||||
@override
|
||||
ConsumerState<PartnerDetailBottomSheet> createState() => _PartnerDetailBottomSheetState();
|
||||
}
|
||||
|
||||
class _PartnerDetailBottomSheetState extends ConsumerState<PartnerDetailBottomSheet> {
|
||||
late final DraggableScrollableController sheetController;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
sheetController = DraggableScrollableController();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
sheetController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Future<void> 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: 'scaffold_body_error_occurred'.tr(), 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}),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> onKeyboardExpand() {
|
||||
return sheetController.animateTo(0.85, duration: const Duration(milliseconds: 200), curve: Curves.easeInOut);
|
||||
}
|
||||
|
||||
return BaseBottomSheet(
|
||||
controller: sheetController,
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return const BaseBottomSheet(
|
||||
initialChildSize: 0.25,
|
||||
maxChildSize: 0.85,
|
||||
maxChildSize: 0.4,
|
||||
shouldCloseOnMinExtent: false,
|
||||
actions: const [
|
||||
actions: [
|
||||
ShareActionButton(source: ActionSource.timeline),
|
||||
DownloadActionButton(source: ActionSource.timeline),
|
||||
],
|
||||
slivers: [
|
||||
const AddToAlbumHeader(),
|
||||
AlbumSelector(onAlbumSelected: addToAlbum, onKeyboardExpanded: onKeyboardExpand),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/domain/models/events.model.dart';
|
||||
@@ -63,11 +65,16 @@ class MapState {
|
||||
class MapStateNotifier extends Notifier<MapState> {
|
||||
MapStateNotifier();
|
||||
|
||||
final StreamController<TimelineMapOptions> _optionsController = StreamController.broadcast();
|
||||
|
||||
Stream<TimelineMapOptions> get optionsStream => _optionsController.stream;
|
||||
|
||||
bool setBounds(LatLngBounds bounds) {
|
||||
if (state.bounds == bounds) {
|
||||
return false;
|
||||
}
|
||||
state = state.copyWith(bounds: bounds);
|
||||
_optionsController.add(state.toOptions());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -82,12 +89,14 @@ class MapStateNotifier extends Notifier<MapState> {
|
||||
void switchFavoriteOnly(bool isFavoriteOnly) {
|
||||
ref.read(settingsProvider).write(.mapShowFavoriteOnly, isFavoriteOnly);
|
||||
state = state.copyWith(onlyFavorites: isFavoriteOnly);
|
||||
_optionsController.add(state.toOptions());
|
||||
EventStream.shared.emit(const MapMarkerReloadEvent());
|
||||
}
|
||||
|
||||
void switchIncludeArchived(bool isIncludeArchived) {
|
||||
ref.read(settingsProvider).write(.mapIncludeArchived, isIncludeArchived);
|
||||
state = state.copyWith(includeArchived: isIncludeArchived);
|
||||
_optionsController.add(state.toOptions());
|
||||
EventStream.shared.emit(const MapMarkerReloadEvent());
|
||||
}
|
||||
|
||||
@@ -100,11 +109,13 @@ class MapStateNotifier extends Notifier<MapState> {
|
||||
void setRelativeTime(int relativeDays) {
|
||||
ref.read(settingsProvider).write(.mapRelativeDate, relativeDays);
|
||||
state = state.copyWith(relativeDays: relativeDays);
|
||||
_optionsController.add(state.toOptions());
|
||||
EventStream.shared.emit(const MapMarkerReloadEvent());
|
||||
}
|
||||
|
||||
@override
|
||||
MapState build() {
|
||||
ref.onDispose(_optionsController.close);
|
||||
final mapConfig = ref.read(appConfigProvider.select((config) => config.map));
|
||||
return MapState(
|
||||
themeMode: mapConfig.themeMode,
|
||||
|
||||
@@ -318,7 +318,7 @@ class BackgroundUploadService {
|
||||
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,
|
||||
fields: entity.isLivePhoto ? {'visibility': api.AssetVisibility.hidden.value} : null,
|
||||
cloudId: entity.isLivePhoto ? null : asset.cloudId,
|
||||
adjustmentTime: entity.isLivePhoto ? null : asset.adjustmentTime?.toIso8601String(),
|
||||
latitude: entity.isLivePhoto ? null : asset.latitude?.toString(),
|
||||
|
||||
@@ -342,7 +342,7 @@ class ForegroundUploadService {
|
||||
file: livePhotoFile,
|
||||
originalFileName: livePhotoTitle,
|
||||
// Visibility hidden on upload to prevent the server from running regular jobs on the live photo asset
|
||||
fields: {...fields, 'visibility': AssetVisibility.hidden.toString()},
|
||||
fields: {...fields, 'visibility': AssetVisibility.hidden.value},
|
||||
cancelToken: cancelToken,
|
||||
onProgress: onProgress != null
|
||||
? (bytes, totalBytes) => onProgress(asset.localId!, livePhotoTitle, bytes, totalBytes)
|
||||
|
||||
@@ -12,7 +12,7 @@ String getThumbnailUrlForRemoteId(
|
||||
bool edited = true,
|
||||
String? thumbhash,
|
||||
}) {
|
||||
final url = '${Store.get(StoreKey.serverEndpoint)}/assets/$id/thumbnail?size=${type.toString()}&edited=$edited';
|
||||
final url = '${Store.get(StoreKey.serverEndpoint)}/assets/$id/thumbnail?size=${type.value}&edited=$edited';
|
||||
return thumbhash != null ? '$url&c=${Uri.encodeComponent(thumbhash)}' : url;
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
7.24.0
|
||||
7.23.0
|
||||
|
||||
4
mobile/openapi/README.md
generated
4
mobile/openapi/README.md
generated
@@ -4,12 +4,12 @@ Immich API
|
||||
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 3.0.3
|
||||
- Generator version: 7.24.0
|
||||
- Generator version: 7.23.0
|
||||
- Build package: org.openapitools.codegen.languages.DartClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
||||
Dart 2.17 or later
|
||||
Dart 2.12 or later
|
||||
|
||||
## Installation & Usage
|
||||
|
||||
|
||||
44
mobile/openapi/lib/model/album_user_role.dart
generated
44
mobile/openapi/lib/model/album_user_role.dart
generated
@@ -11,30 +11,31 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Album user role
|
||||
enum AlbumUserRole {
|
||||
editor._(r'editor'),
|
||||
owner._(r'owner'),
|
||||
viewer._(r'viewer'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AlbumUserRole._(this._value);
|
||||
class AlbumUserRole {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AlbumUserRole._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <AlbumUserRole>[
|
||||
editor,
|
||||
owner,
|
||||
viewer,
|
||||
];
|
||||
|
||||
/// Returns the instance of [AlbumUserRole] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AlbumUserRole? fromJson(dynamic value) => AlbumUserRoleTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AlbumUserRole]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AlbumUserRole> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AlbumUserRole>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -56,11 +57,9 @@ class AlbumUserRoleTypeTransformer {
|
||||
|
||||
const AlbumUserRoleTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AlbumUserRole data) => data._value;
|
||||
String encode(AlbumUserRole data) => data.value;
|
||||
|
||||
/// Returns the instance of [AlbumUserRole] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -69,9 +68,6 @@ class AlbumUserRoleTypeTransformer {
|
||||
/// 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 is AlbumUserRole) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'editor': return AlbumUserRole.editor;
|
||||
@@ -86,7 +82,7 @@ class AlbumUserRoleTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [AlbumUserRoleTypeTransformer] instance.
|
||||
static AlbumUserRoleTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
44
mobile/openapi/lib/model/asset_edit_action.dart
generated
44
mobile/openapi/lib/model/asset_edit_action.dart
generated
@@ -11,30 +11,31 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Type of edit action to perform
|
||||
enum AssetEditAction {
|
||||
crop._(r'crop'),
|
||||
rotate._(r'rotate'),
|
||||
mirror._(r'mirror'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetEditAction._(this._value);
|
||||
class AssetEditAction {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetEditAction._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <AssetEditAction>[
|
||||
crop,
|
||||
rotate,
|
||||
mirror,
|
||||
];
|
||||
|
||||
/// Returns the instance of [AssetEditAction] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetEditAction? fromJson(dynamic value) => AssetEditActionTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetEditAction]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetEditAction> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetEditAction>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -56,11 +57,9 @@ class AssetEditActionTypeTransformer {
|
||||
|
||||
const AssetEditActionTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetEditAction data) => data._value;
|
||||
String encode(AssetEditAction data) => data.value;
|
||||
|
||||
/// Returns the instance of [AssetEditAction] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -69,9 +68,6 @@ class AssetEditActionTypeTransformer {
|
||||
/// 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 is AssetEditAction) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'crop': return AssetEditAction.crop;
|
||||
@@ -86,7 +82,7 @@ class AssetEditActionTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [AssetEditActionTypeTransformer] instance.
|
||||
static AssetEditActionTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
44
mobile/openapi/lib/model/asset_id_error_reason.dart
generated
44
mobile/openapi/lib/model/asset_id_error_reason.dart
generated
@@ -11,30 +11,31 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Error reason if failed
|
||||
enum AssetIdErrorReason {
|
||||
duplicate._(r'duplicate'),
|
||||
noPermission._(r'no_permission'),
|
||||
notFound._(r'not_found'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetIdErrorReason._(this._value);
|
||||
class AssetIdErrorReason {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetIdErrorReason._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <AssetIdErrorReason>[
|
||||
duplicate,
|
||||
noPermission,
|
||||
notFound,
|
||||
];
|
||||
|
||||
/// Returns the instance of [AssetIdErrorReason] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetIdErrorReason? fromJson(dynamic value) => AssetIdErrorReasonTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetIdErrorReason]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetIdErrorReason> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetIdErrorReason>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -56,11 +57,9 @@ class AssetIdErrorReasonTypeTransformer {
|
||||
|
||||
const AssetIdErrorReasonTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetIdErrorReason data) => data._value;
|
||||
String encode(AssetIdErrorReason data) => data.value;
|
||||
|
||||
/// Returns the instance of [AssetIdErrorReason] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -69,9 +68,6 @@ class AssetIdErrorReasonTypeTransformer {
|
||||
/// 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 is AssetIdErrorReason) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'duplicate': return AssetIdErrorReason.duplicate;
|
||||
@@ -86,7 +82,7 @@ class AssetIdErrorReasonTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [AssetIdErrorReasonTypeTransformer] instance.
|
||||
static AssetIdErrorReasonTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
47
mobile/openapi/lib/model/asset_job_name.dart
generated
47
mobile/openapi/lib/model/asset_job_name.dart
generated
@@ -11,31 +11,33 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Job name
|
||||
enum AssetJobName {
|
||||
refreshFaces._(r'refresh-faces'),
|
||||
refreshMetadata._(r'refresh-metadata'),
|
||||
regenerateThumbnail._(r'regenerate-thumbnail'),
|
||||
transcodeVideo._(r'transcode-video'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetJobName._(this._value);
|
||||
class AssetJobName {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetJobName._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <AssetJobName>[
|
||||
refreshFaces,
|
||||
refreshMetadata,
|
||||
regenerateThumbnail,
|
||||
transcodeVideo,
|
||||
];
|
||||
|
||||
/// Returns the instance of [AssetJobName] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetJobName? fromJson(dynamic value) => AssetJobNameTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetJobName]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetJobName> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetJobName>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -57,11 +59,9 @@ class AssetJobNameTypeTransformer {
|
||||
|
||||
const AssetJobNameTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetJobName data) => data._value;
|
||||
String encode(AssetJobName data) => data.value;
|
||||
|
||||
/// Returns the instance of [AssetJobName] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -70,9 +70,6 @@ class AssetJobNameTypeTransformer {
|
||||
/// 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 is AssetJobName) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'refresh-faces': return AssetJobName.refreshFaces;
|
||||
@@ -88,7 +85,7 @@ class AssetJobNameTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [AssetJobNameTypeTransformer] instance.
|
||||
static AssetJobNameTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
47
mobile/openapi/lib/model/asset_media_size.dart
generated
47
mobile/openapi/lib/model/asset_media_size.dart
generated
@@ -11,31 +11,33 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Asset media size
|
||||
enum AssetMediaSize {
|
||||
original._(r'original'),
|
||||
fullsize._(r'fullsize'),
|
||||
preview._(r'preview'),
|
||||
thumbnail._(r'thumbnail'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetMediaSize._(this._value);
|
||||
class AssetMediaSize {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetMediaSize._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <AssetMediaSize>[
|
||||
original,
|
||||
fullsize,
|
||||
preview,
|
||||
thumbnail,
|
||||
];
|
||||
|
||||
/// Returns the instance of [AssetMediaSize] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetMediaSize? fromJson(dynamic value) => AssetMediaSizeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetMediaSize]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetMediaSize> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetMediaSize>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -57,11 +59,9 @@ class AssetMediaSizeTypeTransformer {
|
||||
|
||||
const AssetMediaSizeTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetMediaSize data) => data._value;
|
||||
String encode(AssetMediaSize data) => data.value;
|
||||
|
||||
/// Returns the instance of [AssetMediaSize] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -70,9 +70,6 @@ class AssetMediaSizeTypeTransformer {
|
||||
/// 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 is AssetMediaSize) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'original': return AssetMediaSize.original;
|
||||
@@ -88,7 +85,7 @@ class AssetMediaSizeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [AssetMediaSizeTypeTransformer] instance.
|
||||
static AssetMediaSizeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/asset_media_status.dart
generated
41
mobile/openapi/lib/model/asset_media_status.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Upload status
|
||||
enum AssetMediaStatus {
|
||||
created._(r'created'),
|
||||
duplicate._(r'duplicate'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetMediaStatus._(this._value);
|
||||
class AssetMediaStatus {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetMediaStatus._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <AssetMediaStatus>[
|
||||
created,
|
||||
duplicate,
|
||||
];
|
||||
|
||||
/// Returns the instance of [AssetMediaStatus] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetMediaStatus? fromJson(dynamic value) => AssetMediaStatusTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetMediaStatus]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetMediaStatus> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetMediaStatus>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,11 +55,9 @@ class AssetMediaStatusTypeTransformer {
|
||||
|
||||
const AssetMediaStatusTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetMediaStatus data) => data._value;
|
||||
String encode(AssetMediaStatus data) => data.value;
|
||||
|
||||
/// Returns the instance of [AssetMediaStatus] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -68,9 +66,6 @@ class AssetMediaStatusTypeTransformer {
|
||||
/// 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 is AssetMediaStatus) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'created': return AssetMediaStatus.created;
|
||||
@@ -84,7 +79,7 @@ class AssetMediaStatusTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [AssetMediaStatusTypeTransformer] instance.
|
||||
static AssetMediaStatusTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/asset_order.dart
generated
41
mobile/openapi/lib/model/asset_order.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Asset sort order
|
||||
enum AssetOrder {
|
||||
asc._(r'asc'),
|
||||
desc._(r'desc'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetOrder._(this._value);
|
||||
class AssetOrder {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetOrder._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <AssetOrder>[
|
||||
asc,
|
||||
desc,
|
||||
];
|
||||
|
||||
/// Returns the instance of [AssetOrder] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetOrder? fromJson(dynamic value) => AssetOrderTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetOrder]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetOrder> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetOrder>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,11 +55,9 @@ class AssetOrderTypeTransformer {
|
||||
|
||||
const AssetOrderTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetOrder data) => data._value;
|
||||
String encode(AssetOrder data) => data.value;
|
||||
|
||||
/// Returns the instance of [AssetOrder] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -68,9 +66,6 @@ class AssetOrderTypeTransformer {
|
||||
/// 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 is AssetOrder) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'asc': return AssetOrder.asc;
|
||||
@@ -84,7 +79,7 @@ class AssetOrderTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [AssetOrderTypeTransformer] instance.
|
||||
static AssetOrderTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/asset_order_by.dart
generated
41
mobile/openapi/lib/model/asset_order_by.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Asset sorting property
|
||||
enum AssetOrderBy {
|
||||
takenAt._(r'takenAt'),
|
||||
createdAt._(r'createdAt'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetOrderBy._(this._value);
|
||||
class AssetOrderBy {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetOrderBy._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <AssetOrderBy>[
|
||||
takenAt,
|
||||
createdAt,
|
||||
];
|
||||
|
||||
/// Returns the instance of [AssetOrderBy] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetOrderBy? fromJson(dynamic value) => AssetOrderByTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetOrderBy]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetOrderBy> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetOrderBy>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,11 +55,9 @@ class AssetOrderByTypeTransformer {
|
||||
|
||||
const AssetOrderByTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetOrderBy data) => data._value;
|
||||
String encode(AssetOrderBy data) => data.value;
|
||||
|
||||
/// Returns the instance of [AssetOrderBy] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -68,9 +66,6 @@ class AssetOrderByTypeTransformer {
|
||||
/// 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 is AssetOrderBy) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'takenAt': return AssetOrderBy.takenAt;
|
||||
@@ -84,7 +79,7 @@ class AssetOrderByTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [AssetOrderByTypeTransformer] instance.
|
||||
static AssetOrderByTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/asset_reject_reason.dart
generated
41
mobile/openapi/lib/model/asset_reject_reason.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Rejection reason if rejected
|
||||
enum AssetRejectReason {
|
||||
duplicate._(r'duplicate'),
|
||||
unsupportedFormat._(r'unsupported-format'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetRejectReason._(this._value);
|
||||
class AssetRejectReason {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetRejectReason._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <AssetRejectReason>[
|
||||
duplicate,
|
||||
unsupportedFormat,
|
||||
];
|
||||
|
||||
/// Returns the instance of [AssetRejectReason] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetRejectReason? fromJson(dynamic value) => AssetRejectReasonTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetRejectReason]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetRejectReason> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetRejectReason>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,11 +55,9 @@ class AssetRejectReasonTypeTransformer {
|
||||
|
||||
const AssetRejectReasonTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetRejectReason data) => data._value;
|
||||
String encode(AssetRejectReason data) => data.value;
|
||||
|
||||
/// Returns the instance of [AssetRejectReason] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -68,9 +66,6 @@ class AssetRejectReasonTypeTransformer {
|
||||
/// 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 is AssetRejectReason) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'duplicate': return AssetRejectReason.duplicate;
|
||||
@@ -84,7 +79,7 @@ class AssetRejectReasonTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [AssetRejectReasonTypeTransformer] instance.
|
||||
static AssetRejectReasonTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
47
mobile/openapi/lib/model/asset_type_enum.dart
generated
47
mobile/openapi/lib/model/asset_type_enum.dart
generated
@@ -11,31 +11,33 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Asset type
|
||||
enum AssetTypeEnum {
|
||||
IMAGE._(r'IMAGE'),
|
||||
VIDEO._(r'VIDEO'),
|
||||
AUDIO._(r'AUDIO'),
|
||||
OTHER._(r'OTHER'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetTypeEnum._(this._value);
|
||||
class AssetTypeEnum {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetTypeEnum._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <AssetTypeEnum>[
|
||||
IMAGE,
|
||||
VIDEO,
|
||||
AUDIO,
|
||||
OTHER,
|
||||
];
|
||||
|
||||
/// Returns the instance of [AssetTypeEnum] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetTypeEnum? fromJson(dynamic value) => AssetTypeEnumTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetTypeEnum]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetTypeEnum> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetTypeEnum>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -57,11 +59,9 @@ class AssetTypeEnumTypeTransformer {
|
||||
|
||||
const AssetTypeEnumTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetTypeEnum data) => data._value;
|
||||
String encode(AssetTypeEnum data) => data.value;
|
||||
|
||||
/// Returns the instance of [AssetTypeEnum] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -70,9 +70,6 @@ class AssetTypeEnumTypeTransformer {
|
||||
/// 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 is AssetTypeEnum) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'IMAGE': return AssetTypeEnum.IMAGE;
|
||||
@@ -88,7 +85,7 @@ class AssetTypeEnumTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [AssetTypeEnumTypeTransformer] instance.
|
||||
static AssetTypeEnumTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/asset_upload_action.dart
generated
41
mobile/openapi/lib/model/asset_upload_action.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Upload action
|
||||
enum AssetUploadAction {
|
||||
accept._(r'accept'),
|
||||
reject._(r'reject'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetUploadAction._(this._value);
|
||||
class AssetUploadAction {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetUploadAction._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <AssetUploadAction>[
|
||||
accept,
|
||||
reject,
|
||||
];
|
||||
|
||||
/// Returns the instance of [AssetUploadAction] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetUploadAction? fromJson(dynamic value) => AssetUploadActionTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetUploadAction]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetUploadAction> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetUploadAction>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,11 +55,9 @@ class AssetUploadActionTypeTransformer {
|
||||
|
||||
const AssetUploadActionTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetUploadAction data) => data._value;
|
||||
String encode(AssetUploadAction data) => data.value;
|
||||
|
||||
/// Returns the instance of [AssetUploadAction] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -68,9 +66,6 @@ class AssetUploadActionTypeTransformer {
|
||||
/// 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 is AssetUploadAction) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'accept': return AssetUploadAction.accept;
|
||||
@@ -84,7 +79,7 @@ class AssetUploadActionTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [AssetUploadActionTypeTransformer] instance.
|
||||
static AssetUploadActionTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
47
mobile/openapi/lib/model/asset_visibility.dart
generated
47
mobile/openapi/lib/model/asset_visibility.dart
generated
@@ -11,31 +11,33 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Asset visibility
|
||||
enum AssetVisibility {
|
||||
archive._(r'archive'),
|
||||
timeline._(r'timeline'),
|
||||
hidden._(r'hidden'),
|
||||
locked._(r'locked'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetVisibility._(this._value);
|
||||
class AssetVisibility {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetVisibility._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <AssetVisibility>[
|
||||
archive,
|
||||
timeline,
|
||||
hidden,
|
||||
locked,
|
||||
];
|
||||
|
||||
/// Returns the instance of [AssetVisibility] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetVisibility? fromJson(dynamic value) => AssetVisibilityTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetVisibility]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetVisibility> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetVisibility>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -57,11 +59,9 @@ class AssetVisibilityTypeTransformer {
|
||||
|
||||
const AssetVisibilityTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetVisibility data) => data._value;
|
||||
String encode(AssetVisibility data) => data.value;
|
||||
|
||||
/// Returns the instance of [AssetVisibility] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -70,9 +70,6 @@ class AssetVisibilityTypeTransformer {
|
||||
/// 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 is AssetVisibility) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'archive': return AssetVisibility.archive;
|
||||
@@ -88,7 +85,7 @@ class AssetVisibilityTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [AssetVisibilityTypeTransformer] instance.
|
||||
static AssetVisibilityTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
47
mobile/openapi/lib/model/audio_codec.dart
generated
47
mobile/openapi/lib/model/audio_codec.dart
generated
@@ -11,31 +11,33 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Target audio codec
|
||||
enum AudioCodec {
|
||||
mp3._(r'mp3'),
|
||||
aac._(r'aac'),
|
||||
opus._(r'opus'),
|
||||
pcmS16le._(r'pcm_s16le'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AudioCodec._(this._value);
|
||||
class AudioCodec {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AudioCodec._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <AudioCodec>[
|
||||
mp3,
|
||||
aac,
|
||||
opus,
|
||||
pcmS16le,
|
||||
];
|
||||
|
||||
/// Returns the instance of [AudioCodec] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AudioCodec? fromJson(dynamic value) => AudioCodecTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AudioCodec]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AudioCodec> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AudioCodec>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -57,11 +59,9 @@ class AudioCodecTypeTransformer {
|
||||
|
||||
const AudioCodecTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AudioCodec data) => data._value;
|
||||
String encode(AudioCodec data) => data.value;
|
||||
|
||||
/// Returns the instance of [AudioCodec] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -70,9 +70,6 @@ class AudioCodecTypeTransformer {
|
||||
/// 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 is AudioCodec) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'mp3': return AudioCodec.mp3;
|
||||
@@ -88,7 +85,7 @@ class AudioCodecTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [AudioCodecTypeTransformer] instance.
|
||||
static AudioCodecTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
50
mobile/openapi/lib/model/bulk_id_error_reason.dart
generated
50
mobile/openapi/lib/model/bulk_id_error_reason.dart
generated
@@ -11,32 +11,35 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Error reason
|
||||
enum BulkIdErrorReason {
|
||||
duplicate._(r'duplicate'),
|
||||
noPermission._(r'no_permission'),
|
||||
notFound._(r'not_found'),
|
||||
unknown._(r'unknown'),
|
||||
validation._(r'validation'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const BulkIdErrorReason._(this._value);
|
||||
class BulkIdErrorReason {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const BulkIdErrorReason._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <BulkIdErrorReason>[
|
||||
duplicate,
|
||||
noPermission,
|
||||
notFound,
|
||||
unknown,
|
||||
validation,
|
||||
];
|
||||
|
||||
/// Returns the instance of [BulkIdErrorReason] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static BulkIdErrorReason? fromJson(dynamic value) => BulkIdErrorReasonTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [BulkIdErrorReason]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<BulkIdErrorReason> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <BulkIdErrorReason>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -58,11 +61,9 @@ class BulkIdErrorReasonTypeTransformer {
|
||||
|
||||
const BulkIdErrorReasonTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(BulkIdErrorReason data) => data._value;
|
||||
String encode(BulkIdErrorReason data) => data.value;
|
||||
|
||||
/// Returns the instance of [BulkIdErrorReason] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -71,9 +72,6 @@ class BulkIdErrorReasonTypeTransformer {
|
||||
/// 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 is BulkIdErrorReason) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'duplicate': return BulkIdErrorReason.duplicate;
|
||||
@@ -90,7 +88,7 @@ class BulkIdErrorReasonTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [BulkIdErrorReasonTypeTransformer] instance.
|
||||
static BulkIdErrorReasonTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/calendar_heatmap_type.dart
generated
41
mobile/openapi/lib/model/calendar_heatmap_type.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Type of calendar heatmap
|
||||
enum CalendarHeatmapType {
|
||||
upload._(r'Upload'),
|
||||
taken._(r'Taken'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const CalendarHeatmapType._(this._value);
|
||||
class CalendarHeatmapType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const CalendarHeatmapType._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <CalendarHeatmapType>[
|
||||
upload,
|
||||
taken,
|
||||
];
|
||||
|
||||
/// Returns the instance of [CalendarHeatmapType] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static CalendarHeatmapType? fromJson(dynamic value) => CalendarHeatmapTypeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [CalendarHeatmapType]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<CalendarHeatmapType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <CalendarHeatmapType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,11 +55,9 @@ class CalendarHeatmapTypeTypeTransformer {
|
||||
|
||||
const CalendarHeatmapTypeTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(CalendarHeatmapType data) => data._value;
|
||||
String encode(CalendarHeatmapType data) => data.value;
|
||||
|
||||
/// Returns the instance of [CalendarHeatmapType] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -68,9 +66,6 @@ class CalendarHeatmapTypeTypeTransformer {
|
||||
/// 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 is CalendarHeatmapType) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'Upload': return CalendarHeatmapType.upload;
|
||||
@@ -84,7 +79,7 @@ class CalendarHeatmapTypeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [CalendarHeatmapTypeTypeTransformer] instance.
|
||||
static CalendarHeatmapTypeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/colorspace.dart
generated
41
mobile/openapi/lib/model/colorspace.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Colorspace
|
||||
enum Colorspace {
|
||||
srgb._(r'srgb'),
|
||||
p3._(r'p3'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const Colorspace._(this._value);
|
||||
class Colorspace {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const Colorspace._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <Colorspace>[
|
||||
srgb,
|
||||
p3,
|
||||
];
|
||||
|
||||
/// Returns the instance of [Colorspace] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static Colorspace? fromJson(dynamic value) => ColorspaceTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [Colorspace]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<Colorspace> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <Colorspace>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,11 +55,9 @@ class ColorspaceTypeTransformer {
|
||||
|
||||
const ColorspaceTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(Colorspace data) => data._value;
|
||||
String encode(Colorspace data) => data.value;
|
||||
|
||||
/// Returns the instance of [Colorspace] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -68,9 +66,6 @@ class ColorspaceTypeTransformer {
|
||||
/// 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 is Colorspace) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'srgb': return Colorspace.srgb;
|
||||
@@ -84,7 +79,7 @@ class ColorspaceTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [ColorspaceTypeTransformer] instance.
|
||||
static ColorspaceTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
44
mobile/openapi/lib/model/cq_mode.dart
generated
44
mobile/openapi/lib/model/cq_mode.dart
generated
@@ -11,30 +11,31 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// CQ mode
|
||||
enum CQMode {
|
||||
auto._(r'auto'),
|
||||
cqp._(r'cqp'),
|
||||
icq._(r'icq'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const CQMode._(this._value);
|
||||
class CQMode {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const CQMode._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <CQMode>[
|
||||
auto,
|
||||
cqp,
|
||||
icq,
|
||||
];
|
||||
|
||||
/// Returns the instance of [CQMode] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static CQMode? fromJson(dynamic value) => CQModeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [CQMode]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<CQMode> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <CQMode>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -56,11 +57,9 @@ class CQModeTypeTransformer {
|
||||
|
||||
const CQModeTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(CQMode data) => data._value;
|
||||
String encode(CQMode data) => data.value;
|
||||
|
||||
/// Returns the instance of [CQMode] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -69,9 +68,6 @@ class CQModeTypeTransformer {
|
||||
/// 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 is CQMode) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'auto': return CQMode.auto;
|
||||
@@ -86,7 +82,7 @@ class CQModeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [CQModeTypeTransformer] instance.
|
||||
static CQModeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
50
mobile/openapi/lib/model/hls_video_resolution.dart
generated
50
mobile/openapi/lib/model/hls_video_resolution.dart
generated
@@ -11,32 +11,35 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// HLS video resolution
|
||||
enum HlsVideoResolution {
|
||||
number480._(480),
|
||||
number720._(720),
|
||||
number1080._(1080),
|
||||
number1440._(1440),
|
||||
number2160._(2160),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const HlsVideoResolution._(this._value);
|
||||
class HlsVideoResolution {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const HlsVideoResolution._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final int _value;
|
||||
final int value;
|
||||
|
||||
@override
|
||||
String toString() => _value.toString();
|
||||
String toString() => value.toString();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
int toJson() => _value;
|
||||
int toJson() => value;
|
||||
|
||||
static const number480 = HlsVideoResolution._(480);
|
||||
static const number720 = HlsVideoResolution._(720);
|
||||
static const number1080 = HlsVideoResolution._(1080);
|
||||
static const number1440 = HlsVideoResolution._(1440);
|
||||
static const number2160 = HlsVideoResolution._(2160);
|
||||
|
||||
/// List of all possible values in this [enum][HlsVideoResolution].
|
||||
static const values = <HlsVideoResolution>[
|
||||
number480,
|
||||
number720,
|
||||
number1080,
|
||||
number1440,
|
||||
number2160,
|
||||
];
|
||||
|
||||
/// Returns the instance of [HlsVideoResolution] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static HlsVideoResolution? fromJson(dynamic value) => HlsVideoResolutionTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [HlsVideoResolution]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<HlsVideoResolution> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <HlsVideoResolution>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -58,11 +61,9 @@ class HlsVideoResolutionTypeTransformer {
|
||||
|
||||
const HlsVideoResolutionTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
int encode(HlsVideoResolution data) => data._value;
|
||||
int encode(HlsVideoResolution data) => data.value;
|
||||
|
||||
/// Returns the instance of [HlsVideoResolution] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// Decodes a [dynamic value][data] to a HlsVideoResolution.
|
||||
///
|
||||
/// 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]
|
||||
@@ -71,9 +72,6 @@ class HlsVideoResolutionTypeTransformer {
|
||||
/// 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.
|
||||
HlsVideoResolution? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is HlsVideoResolution) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case 480: return HlsVideoResolution.number480;
|
||||
@@ -90,7 +88,7 @@ class HlsVideoResolutionTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [HlsVideoResolutionTypeTransformer] instance.
|
||||
static HlsVideoResolutionTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/image_format.dart
generated
41
mobile/openapi/lib/model/image_format.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Image format
|
||||
enum ImageFormat {
|
||||
jpeg._(r'jpeg'),
|
||||
webp._(r'webp'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const ImageFormat._(this._value);
|
||||
class ImageFormat {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const ImageFormat._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <ImageFormat>[
|
||||
jpeg,
|
||||
webp,
|
||||
];
|
||||
|
||||
/// Returns the instance of [ImageFormat] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static ImageFormat? fromJson(dynamic value) => ImageFormatTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [ImageFormat]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<ImageFormat> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ImageFormat>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,11 +55,9 @@ class ImageFormatTypeTransformer {
|
||||
|
||||
const ImageFormatTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(ImageFormat data) => data._value;
|
||||
String encode(ImageFormat data) => data.value;
|
||||
|
||||
/// Returns the instance of [ImageFormat] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -68,9 +66,6 @@ class ImageFormatTypeTransformer {
|
||||
/// 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 is ImageFormat) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'jpeg': return ImageFormat.jpeg;
|
||||
@@ -84,7 +79,7 @@ class ImageFormatTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [ImageFormatTypeTransformer] instance.
|
||||
static ImageFormatTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
44
mobile/openapi/lib/model/integrity_report.dart
generated
44
mobile/openapi/lib/model/integrity_report.dart
generated
@@ -11,30 +11,31 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Integrity report type
|
||||
enum IntegrityReport {
|
||||
untrackedFile._(r'untracked_file'),
|
||||
missingFile._(r'missing_file'),
|
||||
checksumMismatch._(r'checksum_mismatch'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const IntegrityReport._(this._value);
|
||||
class IntegrityReport {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const IntegrityReport._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <IntegrityReport>[
|
||||
untrackedFile,
|
||||
missingFile,
|
||||
checksumMismatch,
|
||||
];
|
||||
|
||||
/// Returns the instance of [IntegrityReport] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static IntegrityReport? fromJson(dynamic value) => IntegrityReportTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [IntegrityReport]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<IntegrityReport> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <IntegrityReport>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -56,11 +57,9 @@ class IntegrityReportTypeTransformer {
|
||||
|
||||
const IntegrityReportTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(IntegrityReport data) => data._value;
|
||||
String encode(IntegrityReport data) => data.value;
|
||||
|
||||
/// Returns the instance of [IntegrityReport] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -69,9 +68,6 @@ class IntegrityReportTypeTransformer {
|
||||
/// 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 is IntegrityReport) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'untracked_file': return IntegrityReport.untrackedFile;
|
||||
@@ -86,7 +82,7 @@ class IntegrityReportTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [IntegrityReportTypeTransformer] instance.
|
||||
static IntegrityReportTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
233
mobile/openapi/lib/model/job_name.dart
generated
233
mobile/openapi/lib/model/job_name.dart
generated
@@ -11,93 +11,157 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Job name
|
||||
enum JobName {
|
||||
assetDelete._(r'AssetDelete'),
|
||||
assetDeleteCheck._(r'AssetDeleteCheck'),
|
||||
assetDetectFacesQueueAll._(r'AssetDetectFacesQueueAll'),
|
||||
assetDetectFaces._(r'AssetDetectFaces'),
|
||||
assetDetectDuplicatesQueueAll._(r'AssetDetectDuplicatesQueueAll'),
|
||||
assetDetectDuplicates._(r'AssetDetectDuplicates'),
|
||||
assetEditThumbnailGeneration._(r'AssetEditThumbnailGeneration'),
|
||||
assetEncodeVideoQueueAll._(r'AssetEncodeVideoQueueAll'),
|
||||
assetEncodeVideo._(r'AssetEncodeVideo'),
|
||||
assetEmptyTrash._(r'AssetEmptyTrash'),
|
||||
assetExtractMetadataQueueAll._(r'AssetExtractMetadataQueueAll'),
|
||||
assetExtractMetadata._(r'AssetExtractMetadata'),
|
||||
assetFileMigration._(r'AssetFileMigration'),
|
||||
assetGenerateThumbnailsQueueAll._(r'AssetGenerateThumbnailsQueueAll'),
|
||||
assetGenerateThumbnails._(r'AssetGenerateThumbnails'),
|
||||
auditTableCleanup._(r'AuditTableCleanup'),
|
||||
databaseBackup._(r'DatabaseBackup'),
|
||||
facialRecognitionQueueAll._(r'FacialRecognitionQueueAll'),
|
||||
facialRecognition._(r'FacialRecognition'),
|
||||
fileDelete._(r'FileDelete'),
|
||||
fileMigrationQueueAll._(r'FileMigrationQueueAll'),
|
||||
libraryDeleteCheck._(r'LibraryDeleteCheck'),
|
||||
libraryDelete._(r'LibraryDelete'),
|
||||
libraryRemoveAsset._(r'LibraryRemoveAsset'),
|
||||
libraryScanAssetsQueueAll._(r'LibraryScanAssetsQueueAll'),
|
||||
librarySyncAssets._(r'LibrarySyncAssets'),
|
||||
librarySyncFilesQueueAll._(r'LibrarySyncFilesQueueAll'),
|
||||
librarySyncFiles._(r'LibrarySyncFiles'),
|
||||
libraryScanQueueAll._(r'LibraryScanQueueAll'),
|
||||
hlsSessionCleanup._(r'HlsSessionCleanup'),
|
||||
memoryCleanup._(r'MemoryCleanup'),
|
||||
memoryGenerate._(r'MemoryGenerate'),
|
||||
notificationsCleanup._(r'NotificationsCleanup'),
|
||||
notifyUserSignup._(r'NotifyUserSignup'),
|
||||
notifyAlbumInvite._(r'NotifyAlbumInvite'),
|
||||
notifyAlbumUpdate._(r'NotifyAlbumUpdate'),
|
||||
userDelete._(r'UserDelete'),
|
||||
userDeleteCheck._(r'UserDeleteCheck'),
|
||||
userSyncUsage._(r'UserSyncUsage'),
|
||||
personCleanup._(r'PersonCleanup'),
|
||||
personFileMigration._(r'PersonFileMigration'),
|
||||
personGenerateThumbnail._(r'PersonGenerateThumbnail'),
|
||||
sessionCleanup._(r'SessionCleanup'),
|
||||
sendMail._(r'SendMail'),
|
||||
sidecarQueueAll._(r'SidecarQueueAll'),
|
||||
sidecarCheck._(r'SidecarCheck'),
|
||||
sidecarWrite._(r'SidecarWrite'),
|
||||
smartSearchQueueAll._(r'SmartSearchQueueAll'),
|
||||
smartSearch._(r'SmartSearch'),
|
||||
storageTemplateMigration._(r'StorageTemplateMigration'),
|
||||
storageTemplateMigrationSingle._(r'StorageTemplateMigrationSingle'),
|
||||
tagCleanup._(r'TagCleanup'),
|
||||
versionCheck._(r'VersionCheck'),
|
||||
ocrQueueAll._(r'OcrQueueAll'),
|
||||
ocr._(r'Ocr'),
|
||||
workflowAssetTrigger._(r'WorkflowAssetTrigger'),
|
||||
integrityUntrackedFilesQueueAll._(r'IntegrityUntrackedFilesQueueAll'),
|
||||
integrityUntrackedFiles._(r'IntegrityUntrackedFiles'),
|
||||
integrityUntrackedRefresh._(r'IntegrityUntrackedRefresh'),
|
||||
integrityMissingFilesQueueAll._(r'IntegrityMissingFilesQueueAll'),
|
||||
integrityMissingFiles._(r'IntegrityMissingFiles'),
|
||||
integrityMissingFilesRefresh._(r'IntegrityMissingFilesRefresh'),
|
||||
integrityChecksumFiles._(r'IntegrityChecksumFiles'),
|
||||
integrityChecksumFilesRefresh._(r'IntegrityChecksumFilesRefresh'),
|
||||
integrityDeleteReportType._(r'IntegrityDeleteReportType'),
|
||||
integrityDeleteReports._(r'IntegrityDeleteReports'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const JobName._(this._value);
|
||||
class JobName {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const JobName._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <JobName>[
|
||||
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,
|
||||
];
|
||||
|
||||
/// Returns the instance of [JobName] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static JobName? fromJson(dynamic value) => JobNameTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [JobName]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<JobName> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <JobName>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -119,11 +183,9 @@ class JobNameTypeTransformer {
|
||||
|
||||
const JobNameTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(JobName data) => data._value;
|
||||
String encode(JobName data) => data.value;
|
||||
|
||||
/// Returns the instance of [JobName] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -132,9 +194,6 @@ class JobNameTypeTransformer {
|
||||
/// 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 is JobName) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'AssetDelete': return JobName.assetDelete;
|
||||
@@ -212,7 +271,7 @@ class JobNameTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [JobNameTypeTransformer] instance.
|
||||
static JobNameTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
53
mobile/openapi/lib/model/log_level.dart
generated
53
mobile/openapi/lib/model/log_level.dart
generated
@@ -11,33 +11,37 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Log level
|
||||
enum LogLevel {
|
||||
verbose._(r'verbose'),
|
||||
debug._(r'debug'),
|
||||
log._(r'log'),
|
||||
warn._(r'warn'),
|
||||
error._(r'error'),
|
||||
fatal._(r'fatal'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const LogLevel._(this._value);
|
||||
class LogLevel {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const LogLevel._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <LogLevel>[
|
||||
verbose,
|
||||
debug,
|
||||
log,
|
||||
warn,
|
||||
error,
|
||||
fatal,
|
||||
];
|
||||
|
||||
/// Returns the instance of [LogLevel] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static LogLevel? fromJson(dynamic value) => LogLevelTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [LogLevel]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<LogLevel> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <LogLevel>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -59,11 +63,9 @@ class LogLevelTypeTransformer {
|
||||
|
||||
const LogLevelTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(LogLevel data) => data._value;
|
||||
String encode(LogLevel data) => data.value;
|
||||
|
||||
/// Returns the instance of [LogLevel] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -72,9 +74,6 @@ class LogLevelTypeTransformer {
|
||||
/// 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 is LogLevel) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'verbose': return LogLevel.verbose;
|
||||
@@ -92,7 +91,7 @@ class LogLevelTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [LogLevelTypeTransformer] instance.
|
||||
static LogLevelTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
47
mobile/openapi/lib/model/maintenance_action.dart
generated
47
mobile/openapi/lib/model/maintenance_action.dart
generated
@@ -11,31 +11,33 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Maintenance action
|
||||
enum MaintenanceAction {
|
||||
start._(r'start'),
|
||||
end._(r'end'),
|
||||
selectDatabaseRestore._(r'select_database_restore'),
|
||||
restoreDatabase._(r'restore_database'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const MaintenanceAction._(this._value);
|
||||
class MaintenanceAction {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const MaintenanceAction._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <MaintenanceAction>[
|
||||
start,
|
||||
end,
|
||||
selectDatabaseRestore,
|
||||
restoreDatabase,
|
||||
];
|
||||
|
||||
/// Returns the instance of [MaintenanceAction] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static MaintenanceAction? fromJson(dynamic value) => MaintenanceActionTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [MaintenanceAction]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<MaintenanceAction> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <MaintenanceAction>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -57,11 +59,9 @@ class MaintenanceActionTypeTransformer {
|
||||
|
||||
const MaintenanceActionTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(MaintenanceAction data) => data._value;
|
||||
String encode(MaintenanceAction data) => data.value;
|
||||
|
||||
/// Returns the instance of [MaintenanceAction] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -70,9 +70,6 @@ class MaintenanceActionTypeTransformer {
|
||||
/// 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 is MaintenanceAction) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'start': return MaintenanceAction.start;
|
||||
@@ -88,7 +85,7 @@ class MaintenanceActionTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [MaintenanceActionTypeTransformer] instance.
|
||||
static MaintenanceActionTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
80
mobile/openapi/lib/model/manual_job_name.dart
generated
80
mobile/openapi/lib/model/manual_job_name.dart
generated
@@ -11,42 +11,55 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Manual job name
|
||||
enum ManualJobName {
|
||||
personCleanup._(r'person-cleanup'),
|
||||
tagCleanup._(r'tag-cleanup'),
|
||||
userCleanup._(r'user-cleanup'),
|
||||
memoryCleanup._(r'memory-cleanup'),
|
||||
memoryCreate._(r'memory-create'),
|
||||
backupDatabase._(r'backup-database'),
|
||||
integrityMissingFiles._(r'integrity-missing-files'),
|
||||
integrityUntrackedFiles._(r'integrity-untracked-files'),
|
||||
integrityChecksumMismatch._(r'integrity-checksum-mismatch'),
|
||||
integrityMissingFilesRefresh._(r'integrity-missing-files-refresh'),
|
||||
integrityUntrackedFilesRefresh._(r'integrity-untracked-files-refresh'),
|
||||
integrityChecksumMismatchRefresh._(r'integrity-checksum-mismatch-refresh'),
|
||||
integrityMissingFilesDeleteAll._(r'integrity-missing-files-delete-all'),
|
||||
integrityUntrackedFilesDeleteAll._(r'integrity-untracked-files-delete-all'),
|
||||
integrityChecksumMismatchDeleteAll._(r'integrity-checksum-mismatch-delete-all'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const ManualJobName._(this._value);
|
||||
class ManualJobName {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const ManualJobName._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <ManualJobName>[
|
||||
personCleanup,
|
||||
tagCleanup,
|
||||
userCleanup,
|
||||
memoryCleanup,
|
||||
memoryCreate,
|
||||
backupDatabase,
|
||||
integrityMissingFiles,
|
||||
integrityUntrackedFiles,
|
||||
integrityChecksumMismatch,
|
||||
integrityMissingFilesRefresh,
|
||||
integrityUntrackedFilesRefresh,
|
||||
integrityChecksumMismatchRefresh,
|
||||
integrityMissingFilesDeleteAll,
|
||||
integrityUntrackedFilesDeleteAll,
|
||||
integrityChecksumMismatchDeleteAll,
|
||||
];
|
||||
|
||||
/// Returns the instance of [ManualJobName] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static ManualJobName? fromJson(dynamic value) => ManualJobNameTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [ManualJobName]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<ManualJobName> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ManualJobName>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -68,11 +81,9 @@ class ManualJobNameTypeTransformer {
|
||||
|
||||
const ManualJobNameTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(ManualJobName data) => data._value;
|
||||
String encode(ManualJobName data) => data.value;
|
||||
|
||||
/// Returns the instance of [ManualJobName] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -81,9 +92,6 @@ class ManualJobNameTypeTransformer {
|
||||
/// 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 is ManualJobName) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'person-cleanup': return ManualJobName.personCleanup;
|
||||
@@ -110,7 +118,7 @@ class ManualJobNameTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [ManualJobNameTypeTransformer] instance.
|
||||
static ManualJobNameTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
44
mobile/openapi/lib/model/memory_search_order.dart
generated
44
mobile/openapi/lib/model/memory_search_order.dart
generated
@@ -11,30 +11,31 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Sort order
|
||||
enum MemorySearchOrder {
|
||||
asc._(r'asc'),
|
||||
desc._(r'desc'),
|
||||
random._(r'random'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const MemorySearchOrder._(this._value);
|
||||
class MemorySearchOrder {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const MemorySearchOrder._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <MemorySearchOrder>[
|
||||
asc,
|
||||
desc,
|
||||
random,
|
||||
];
|
||||
|
||||
/// Returns the instance of [MemorySearchOrder] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static MemorySearchOrder? fromJson(dynamic value) => MemorySearchOrderTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [MemorySearchOrder]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<MemorySearchOrder> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <MemorySearchOrder>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -56,11 +57,9 @@ class MemorySearchOrderTypeTransformer {
|
||||
|
||||
const MemorySearchOrderTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(MemorySearchOrder data) => data._value;
|
||||
String encode(MemorySearchOrder data) => data.value;
|
||||
|
||||
/// Returns the instance of [MemorySearchOrder] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -69,9 +68,6 @@ class MemorySearchOrderTypeTransformer {
|
||||
/// 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 is MemorySearchOrder) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'asc': return MemorySearchOrder.asc;
|
||||
@@ -86,7 +82,7 @@ class MemorySearchOrderTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [MemorySearchOrderTypeTransformer] instance.
|
||||
static MemorySearchOrderTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
38
mobile/openapi/lib/model/memory_type.dart
generated
38
mobile/openapi/lib/model/memory_type.dart
generated
@@ -11,28 +11,27 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Memory type
|
||||
enum MemoryType {
|
||||
onThisDay._(r'on_this_day'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const MemoryType._(this._value);
|
||||
class MemoryType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const MemoryType._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
String toJson() => value;
|
||||
|
||||
static const onThisDay = MemoryType._(r'on_this_day');
|
||||
|
||||
/// List of all possible values in this [enum][MemoryType].
|
||||
static const values = <MemoryType>[
|
||||
onThisDay,
|
||||
];
|
||||
|
||||
/// Returns the instance of [MemoryType] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static MemoryType? fromJson(dynamic value) => MemoryTypeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [MemoryType]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<MemoryType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <MemoryType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -54,11 +53,9 @@ class MemoryTypeTypeTransformer {
|
||||
|
||||
const MemoryTypeTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(MemoryType data) => data._value;
|
||||
String encode(MemoryType data) => data.value;
|
||||
|
||||
/// Returns the instance of [MemoryType] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -67,9 +64,6 @@ class MemoryTypeTypeTransformer {
|
||||
/// 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 is MemoryType) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'on_this_day': return MemoryType.onThisDay;
|
||||
@@ -82,7 +76,7 @@ class MemoryTypeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [MemoryTypeTypeTransformer] instance.
|
||||
static MemoryTypeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/mirror_axis.dart
generated
41
mobile/openapi/lib/model/mirror_axis.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Axis to mirror along
|
||||
enum MirrorAxis {
|
||||
horizontal._(r'horizontal'),
|
||||
vertical._(r'vertical'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const MirrorAxis._(this._value);
|
||||
class MirrorAxis {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const MirrorAxis._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <MirrorAxis>[
|
||||
horizontal,
|
||||
vertical,
|
||||
];
|
||||
|
||||
/// Returns the instance of [MirrorAxis] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static MirrorAxis? fromJson(dynamic value) => MirrorAxisTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [MirrorAxis]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<MirrorAxis> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <MirrorAxis>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,11 +55,9 @@ class MirrorAxisTypeTransformer {
|
||||
|
||||
const MirrorAxisTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(MirrorAxis data) => data._value;
|
||||
String encode(MirrorAxis data) => data.value;
|
||||
|
||||
/// Returns the instance of [MirrorAxis] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -68,9 +66,6 @@ class MirrorAxisTypeTransformer {
|
||||
/// 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 is MirrorAxis) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'horizontal': return MirrorAxis.horizontal;
|
||||
@@ -84,7 +79,7 @@ class MirrorAxisTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [MirrorAxisTypeTransformer] instance.
|
||||
static MirrorAxisTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
47
mobile/openapi/lib/model/notification_level.dart
generated
47
mobile/openapi/lib/model/notification_level.dart
generated
@@ -11,31 +11,33 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Notification level
|
||||
enum NotificationLevel {
|
||||
success._(r'success'),
|
||||
error._(r'error'),
|
||||
warning._(r'warning'),
|
||||
info._(r'info'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const NotificationLevel._(this._value);
|
||||
class NotificationLevel {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const NotificationLevel._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String _value;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => _value;
|
||||
String toString() => value;
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _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 = <NotificationLevel>[
|
||||
success,
|
||||
error,
|
||||
warning,
|
||||
info,
|
||||
];
|
||||
|
||||
/// Returns the instance of [NotificationLevel] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static NotificationLevel? fromJson(dynamic value) => NotificationLevelTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [NotificationLevel]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<NotificationLevel> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <NotificationLevel>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -57,11 +59,9 @@ class NotificationLevelTypeTransformer {
|
||||
|
||||
const NotificationLevelTypeTransformer._();
|
||||
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(NotificationLevel data) => data._value;
|
||||
String encode(NotificationLevel data) => data.value;
|
||||
|
||||
/// Returns the instance of [NotificationLevel] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
/// 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]
|
||||
@@ -70,9 +70,6 @@ class NotificationLevelTypeTransformer {
|
||||
/// 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 is NotificationLevel) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'success': return NotificationLevel.success;
|
||||
@@ -88,7 +85,7 @@ class NotificationLevelTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// The singleton instance of this transformer.
|
||||
/// Singleton [NotificationLevelTypeTransformer] instance.
|
||||
static NotificationLevelTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user