Skip to content

Commit 70e62cb

Browse files
committed
chore: sql and openapi sync
1 parent 843b9ff commit 70e62cb

File tree

14 files changed

+114
-129
lines changed

14 files changed

+114
-129
lines changed

mobile/openapi/README.md

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/api.dart

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/api_client.dart

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/api_helper.dart

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/model/rotate_parameters.dart

Lines changed: 82 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/model/rotation_angle.dart

Lines changed: 0 additions & 91 deletions
This file was deleted.

open-api/immich-openapi-specs.json

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19230,29 +19230,21 @@
1923019230
"RotateParameters": {
1923119231
"properties": {
1923219232
"angle": {
19233-
"allOf": [
19234-
{
19235-
"$ref": "#/components/schemas/RotationAngle"
19236-
}
19233+
"description": "Rotation angle in degrees",
19234+
"enum": [
19235+
0,
19236+
90,
19237+
180,
19238+
270
1923719239
],
19238-
"description": "Rotation angle in degrees"
19240+
"type": "number"
1923919241
}
1924019242
},
1924119243
"required": [
1924219244
"angle"
1924319245
],
1924419246
"type": "object"
1924519247
},
19246-
"RotationAngle": {
19247-
"description": "Rotation angle in degrees",
19248-
"enum": [
19249-
0,
19250-
90,
19251-
180,
19252-
270
19253-
],
19254-
"type": "number"
19255-
},
1925619248
"SearchAlbumResponseDto": {
1925719249
"properties": {
1925819250
"count": {

open-api/typescript-sdk/src/fetch-client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ export type EditActionCrop = {
571571
};
572572
export type RotateParameters = {
573573
/** Rotation angle in degrees */
574-
angle: RotationAngle;
574+
angle: Angle;
575575
};
576576
export type EditActionRotate = {
577577
action: EditAction;
@@ -5448,7 +5448,7 @@ export enum EditAction {
54485448
Rotate = "rotate",
54495449
Mirror = "mirror"
54505450
}
5451-
export enum RotationAngle {
5451+
export enum Angle {
54525452
$0 = 0,
54535453
$90 = 90,
54545454
$180 = 180,

server/src/queries/asset.edit.repository.sql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ rollback
1010
-- AssetEditRepository.getEditsForAsset
1111
select
1212
"action",
13-
"parameters",
14-
"index"
13+
"parameters"
1514
from
1615
"asset_edit"
1716
where

server/src/queries/asset.job.repository.sql

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,11 @@ select
8181
(
8282
select
8383
"asset_edit"."action",
84-
"asset_edit"."parameters",
85-
"asset_edit"."index"
84+
"asset_edit"."parameters"
8685
from
8786
"asset_edit"
8887
where
8988
"asset_edit"."assetId" = "asset"."id"
90-
order by
91-
"asset_edit"."index" asc
9289
) as agg
9390
) as "edits"
9491
from
@@ -159,14 +156,11 @@ select
159156
(
160157
select
161158
"asset_edit"."action",
162-
"asset_edit"."parameters",
163-
"asset_edit"."index"
159+
"asset_edit"."parameters"
164160
from
165161
"asset_edit"
166162
where
167163
"asset_edit"."assetId" = "asset"."id"
168-
order by
169-
"asset_edit"."index" asc
170164
) as agg
171165
) as "edits",
172166
to_json("asset_exif") as "exifInfo"
@@ -206,12 +200,13 @@ select
206200
where
207201
"asset_face"."assetId" = "asset"."id"
208202
and "asset_face"."deletedAt" is null
203+
and "asset_face"."isVisible" = $1
209204
) as agg
210205
) as "faces"
211206
from
212207
"asset"
213208
where
214-
"asset"."id" = $1
209+
"asset"."id" = $2
215210

216211
-- AssetJobRepository.getAlbumThumbnailFiles
217212
select
@@ -381,6 +376,7 @@ select
381376
where
382377
"asset_face"."assetId" = "asset"."id"
383378
and "asset_face"."deletedAt" is null
379+
and "asset_face"."isVisible" is true
384380
) as agg
385381
) as "faces",
386382
(

0 commit comments

Comments
 (0)