1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-08 12:56:48 +01:00

chore: make open-api

This commit is contained in:
Eli Gao 2024-12-25 01:31:46 +08:00
parent 152dc29c43
commit 9a67ec39cd
11 changed files with 80 additions and 243 deletions

BIN
mobile/openapi/README.md generated

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1424,6 +1424,7 @@
}, },
"/assets/bulk-upload-check": { "/assets/bulk-upload-check": {
"post": { "post": {
"description": "Checks if assets exist by checksums",
"operationId": "checkBulkUpload", "operationId": "checkBulkUpload",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
@ -1459,7 +1460,6 @@
"api_key": [] "api_key": []
} }
], ],
"summary": "Checks if assets exist by checksums",
"tags": [ "tags": [
"Assets" "Assets"
] ]
@ -1467,6 +1467,7 @@
}, },
"/assets/device/{deviceId}": { "/assets/device/{deviceId}": {
"get": { "get": {
"description": "Get all asset of a device that are in the database, ID only.",
"operationId": "getAllUserAssetsByDeviceId", "operationId": "getAllUserAssetsByDeviceId",
"parameters": [ "parameters": [
{ {
@ -1504,7 +1505,6 @@
"api_key": [] "api_key": []
} }
], ],
"summary": "Get all asset of a device that are in the database, ID only.",
"tags": [ "tags": [
"Assets" "Assets"
] ]
@ -1512,6 +1512,7 @@
}, },
"/assets/exist": { "/assets/exist": {
"post": { "post": {
"description": "Checks if multiple assets exist on the server and returns all existing - used by background backup",
"operationId": "checkExistingAssets", "operationId": "checkExistingAssets",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
@ -1547,7 +1548,6 @@
"api_key": [] "api_key": []
} }
], ],
"summary": "Checks if multiple assets exist on the server and returns all existing - used by background backup",
"tags": [ "tags": [
"Assets" "Assets"
] ]
@ -1903,6 +1903,7 @@
] ]
}, },
"put": { "put": {
"description": "Replace the asset with new file, without changing its id",
"operationId": "replaceAsset", "operationId": "replaceAsset",
"parameters": [ "parameters": [
{ {
@ -1956,7 +1957,6 @@
"api_key": [] "api_key": []
} }
], ],
"summary": "Replace the asset with new file, without changing its id",
"tags": [ "tags": [
"Assets" "Assets"
], ],
@ -7492,7 +7492,6 @@
"items": { "items": {
"$ref": "#/components/schemas/Permission" "$ref": "#/components/schemas/Permission"
}, },
"minItems": 1,
"type": "array" "type": "array"
} }
}, },
@ -7573,11 +7572,7 @@
"type": "string" "type": "string"
}, },
"type": { "type": {
"allOf": [ "$ref": "#/components/schemas/ReactionType"
{
"$ref": "#/components/schemas/ReactionType"
}
]
} }
}, },
"required": [ "required": [
@ -7604,11 +7599,7 @@
"type": "string" "type": "string"
}, },
"type": { "type": {
"allOf": [ "$ref": "#/components/schemas/ReactionType"
{
"$ref": "#/components/schemas/ReactionType"
}
]
}, },
"user": { "user": {
"$ref": "#/components/schemas/UserResponseDto" "$ref": "#/components/schemas/UserResponseDto"
@ -7640,7 +7631,6 @@
"items": { "items": {
"$ref": "#/components/schemas/AlbumUserAddDto" "$ref": "#/components/schemas/AlbumUserAddDto"
}, },
"minItems": 1,
"type": "array" "type": "array"
} }
}, },
@ -7709,11 +7699,7 @@
"type": "string" "type": "string"
}, },
"order": { "order": {
"allOf": [ "$ref": "#/components/schemas/AssetOrder"
{
"$ref": "#/components/schemas/AssetOrder"
}
]
}, },
"owner": { "owner": {
"$ref": "#/components/schemas/UserResponseDto" "$ref": "#/components/schemas/UserResponseDto"
@ -7773,12 +7759,7 @@
"AlbumUserAddDto": { "AlbumUserAddDto": {
"properties": { "properties": {
"role": { "role": {
"allOf": [ "$ref": "#/components/schemas/AlbumUserRole"
{
"$ref": "#/components/schemas/AlbumUserRole"
}
],
"default": "editor"
}, },
"userId": { "userId": {
"format": "uuid", "format": "uuid",
@ -7793,11 +7774,7 @@
"AlbumUserCreateDto": { "AlbumUserCreateDto": {
"properties": { "properties": {
"role": { "role": {
"allOf": [ "$ref": "#/components/schemas/AlbumUserRole"
{
"$ref": "#/components/schemas/AlbumUserRole"
}
]
}, },
"userId": { "userId": {
"format": "uuid", "format": "uuid",
@ -7813,11 +7790,7 @@
"AlbumUserResponseDto": { "AlbumUserResponseDto": {
"properties": { "properties": {
"role": { "role": {
"allOf": [ "$ref": "#/components/schemas/AlbumUserRole"
{
"$ref": "#/components/schemas/AlbumUserRole"
}
]
}, },
"user": { "user": {
"$ref": "#/components/schemas/UserResponseDto" "$ref": "#/components/schemas/UserResponseDto"
@ -8114,11 +8087,7 @@
"nullable": true "nullable": true
}, },
"sourceType": { "sourceType": {
"allOf": [ "$ref": "#/components/schemas/SourceType"
{
"$ref": "#/components/schemas/SourceType"
}
]
} }
}, },
"required": [ "required": [
@ -8189,11 +8158,7 @@
"type": "integer" "type": "integer"
}, },
"sourceType": { "sourceType": {
"allOf": [ "$ref": "#/components/schemas/SourceType"
{
"$ref": "#/components/schemas/SourceType"
}
]
} }
}, },
"required": [ "required": [
@ -8289,11 +8254,7 @@
"type": "array" "type": "array"
}, },
"name": { "name": {
"allOf": [ "$ref": "#/components/schemas/AssetJobName"
{
"$ref": "#/components/schemas/AssetJobName"
}
]
} }
}, },
"required": [ "required": [
@ -8391,11 +8352,7 @@
"type": "string" "type": "string"
}, },
"status": { "status": {
"allOf": [ "$ref": "#/components/schemas/AssetMediaStatus"
{
"$ref": "#/components/schemas/AssetMediaStatus"
}
]
} }
}, },
"required": [ "required": [
@ -8534,11 +8491,7 @@
"type": "string" "type": "string"
}, },
"type": { "type": {
"allOf": [ "$ref": "#/components/schemas/AssetTypeEnum"
{
"$ref": "#/components/schemas/AssetTypeEnum"
}
]
}, },
"unassignedFaces": { "unassignedFaces": {
"items": { "items": {
@ -8651,11 +8604,7 @@
"AvatarResponse": { "AvatarResponse": {
"properties": { "properties": {
"color": { "color": {
"allOf": [ "$ref": "#/components/schemas/UserAvatarColor"
{
"$ref": "#/components/schemas/UserAvatarColor"
}
]
} }
}, },
"required": [ "required": [
@ -8666,11 +8615,7 @@
"AvatarUpdate": { "AvatarUpdate": {
"properties": { "properties": {
"color": { "color": {
"allOf": [ "$ref": "#/components/schemas/UserAvatarColor"
{
"$ref": "#/components/schemas/UserAvatarColor"
}
]
} }
}, },
"type": "object" "type": "object"
@ -8761,7 +8706,6 @@
"items": { "items": {
"type": "string" "type": "string"
}, },
"minItems": 1,
"type": "array" "type": "array"
}, },
"deviceId": { "deviceId": {
@ -8828,17 +8772,13 @@
"items": { "items": {
"type": "string" "type": "string"
}, },
"maxItems": 128, "type": "array"
"type": "array",
"uniqueItems": true
}, },
"importPaths": { "importPaths": {
"items": { "items": {
"type": "string" "type": "string"
}, },
"maxItems": 128, "type": "array"
"type": "array",
"uniqueItems": true
}, },
"name": { "name": {
"type": "string" "type": "string"
@ -9307,18 +9247,10 @@
"type": "string" "type": "string"
}, },
"entityType": { "entityType": {
"allOf": [ "$ref": "#/components/schemas/PathEntityType"
{
"$ref": "#/components/schemas/PathEntityType"
}
]
}, },
"pathType": { "pathType": {
"allOf": [ "$ref": "#/components/schemas/PathType"
{
"$ref": "#/components/schemas/PathType"
}
]
}, },
"pathValue": { "pathValue": {
"type": "string" "type": "string"
@ -9380,11 +9312,7 @@
"JobCommandDto": { "JobCommandDto": {
"properties": { "properties": {
"command": { "command": {
"allOf": [ "$ref": "#/components/schemas/JobCommand"
{
"$ref": "#/components/schemas/JobCommand"
}
]
}, },
"force": { "force": {
"type": "boolean" "type": "boolean"
@ -9429,11 +9357,7 @@
"JobCreateDto": { "JobCreateDto": {
"properties": { "properties": {
"name": { "name": {
"allOf": [ "$ref": "#/components/schemas/ManualJobName"
{
"$ref": "#/components/schemas/ManualJobName"
}
]
} }
}, },
"required": [ "required": [
@ -9621,7 +9545,6 @@
"properties": { "properties": {
"email": { "email": {
"example": "testuser@email.com", "example": "testuser@email.com",
"format": "email",
"type": "string" "type": "string"
}, },
"password": { "password": {
@ -9795,11 +9718,7 @@
"type": "string" "type": "string"
}, },
"type": { "type": {
"allOf": [ "$ref": "#/components/schemas/MemoryType"
{
"$ref": "#/components/schemas/MemoryType"
}
]
} }
}, },
"required": [ "required": [
@ -9864,11 +9783,7 @@
"type": "string" "type": "string"
}, },
"type": { "type": {
"allOf": [ "$ref": "#/components/schemas/MemoryType"
{
"$ref": "#/components/schemas/MemoryType"
}
]
}, },
"updatedAt": { "updatedAt": {
"format": "date-time", "format": "date-time",
@ -9997,11 +9912,7 @@
"type": "string" "type": "string"
}, },
"order": { "order": {
"allOf": [ "$ref": "#/components/schemas/AssetOrder"
{
"$ref": "#/components/schemas/AssetOrder"
}
]
}, },
"originalFileName": { "originalFileName": {
"type": "string" "type": "string"
@ -10052,11 +9963,7 @@
"type": "string" "type": "string"
}, },
"type": { "type": {
"allOf": [ "$ref": "#/components/schemas/AssetTypeEnum"
{
"$ref": "#/components/schemas/AssetTypeEnum"
}
]
}, },
"updatedAfter": { "updatedAfter": {
"format": "date-time", "format": "date-time",
@ -10140,11 +10047,7 @@
"PartnerResponseDto": { "PartnerResponseDto": {
"properties": { "properties": {
"avatarColor": { "avatarColor": {
"allOf": [ "$ref": "#/components/schemas/UserAvatarColor"
{
"$ref": "#/components/schemas/UserAvatarColor"
}
]
}, },
"email": { "email": {
"type": "string" "type": "string"
@ -10663,11 +10566,7 @@
"type": "string" "type": "string"
}, },
"type": { "type": {
"allOf": [ "$ref": "#/components/schemas/AssetTypeEnum"
{
"$ref": "#/components/schemas/AssetTypeEnum"
}
]
}, },
"updatedAfter": { "updatedAfter": {
"format": "date-time", "format": "date-time",
@ -11335,11 +11234,7 @@
"type": "boolean" "type": "boolean"
}, },
"type": { "type": {
"allOf": [ "$ref": "#/components/schemas/SharedLinkType"
{
"$ref": "#/components/schemas/SharedLinkType"
}
]
} }
}, },
"required": [ "required": [
@ -11424,11 +11319,7 @@
"type": "string" "type": "string"
}, },
"type": { "type": {
"allOf": [ "$ref": "#/components/schemas/SharedLinkType"
{
"$ref": "#/components/schemas/SharedLinkType"
}
]
}, },
"userId": { "userId": {
"type": "string" "type": "string"
@ -11461,7 +11352,6 @@
"properties": { "properties": {
"email": { "email": {
"example": "testuser@email.com", "example": "testuser@email.com",
"format": "email",
"type": "string" "type": "string"
}, },
"name": { "name": {
@ -11578,11 +11468,7 @@
"type": "string" "type": "string"
}, },
"type": { "type": {
"allOf": [ "$ref": "#/components/schemas/AssetTypeEnum"
{
"$ref": "#/components/schemas/AssetTypeEnum"
}
]
}, },
"updatedAfter": { "updatedAfter": {
"format": "date-time", "format": "date-time",
@ -11623,7 +11509,6 @@
"format": "uuid", "format": "uuid",
"type": "string" "type": "string"
}, },
"minItems": 2,
"type": "array" "type": "array"
} }
}, },
@ -11764,11 +11649,7 @@
"SystemConfigFFmpegDto": { "SystemConfigFFmpegDto": {
"properties": { "properties": {
"accel": { "accel": {
"allOf": [ "$ref": "#/components/schemas/TranscodeHWAccel"
{
"$ref": "#/components/schemas/TranscodeHWAccel"
}
]
}, },
"accelDecode": { "accelDecode": {
"type": "boolean" "type": "boolean"
@ -11797,11 +11678,7 @@
"type": "integer" "type": "integer"
}, },
"cqMode": { "cqMode": {
"allOf": [ "$ref": "#/components/schemas/CQMode"
{
"$ref": "#/components/schemas/CQMode"
}
]
}, },
"crf": { "crf": {
"maximum": 51, "maximum": 51,
@ -11827,21 +11704,13 @@
"type": "integer" "type": "integer"
}, },
"targetAudioCodec": { "targetAudioCodec": {
"allOf": [ "$ref": "#/components/schemas/AudioCodec"
{
"$ref": "#/components/schemas/AudioCodec"
}
]
}, },
"targetResolution": { "targetResolution": {
"type": "string" "type": "string"
}, },
"targetVideoCodec": { "targetVideoCodec": {
"allOf": [ "$ref": "#/components/schemas/VideoCodec"
{
"$ref": "#/components/schemas/VideoCodec"
}
]
}, },
"temporalAQ": { "temporalAQ": {
"type": "boolean" "type": "boolean"
@ -11851,18 +11720,10 @@
"type": "integer" "type": "integer"
}, },
"tonemap": { "tonemap": {
"allOf": [ "$ref": "#/components/schemas/ToneMapping"
{
"$ref": "#/components/schemas/ToneMapping"
}
]
}, },
"transcode": { "transcode": {
"allOf": [ "$ref": "#/components/schemas/TranscodePolicy"
{
"$ref": "#/components/schemas/TranscodePolicy"
}
]
}, },
"twoPass": { "twoPass": {
"type": "boolean" "type": "boolean"
@ -11904,14 +11765,31 @@
], ],
"type": "object" "type": "object"
}, },
"SystemConfigGeneratedFullsizeImageDto": {
"properties": {
"enabled": {
"type": "boolean"
},
"format": {
"$ref": "#/components/schemas/ImageFormat"
},
"quality": {
"maximum": 100,
"minimum": 1,
"type": "integer"
}
},
"required": [
"enabled",
"format",
"quality"
],
"type": "object"
},
"SystemConfigGeneratedImageDto": { "SystemConfigGeneratedImageDto": {
"properties": { "properties": {
"format": { "format": {
"allOf": [ "$ref": "#/components/schemas/ImageFormat"
{
"$ref": "#/components/schemas/ImageFormat"
}
]
}, },
"quality": { "quality": {
"maximum": 100, "maximum": 100,
@ -11933,17 +11811,13 @@
"SystemConfigImageDto": { "SystemConfigImageDto": {
"properties": { "properties": {
"colorspace": { "colorspace": {
"allOf": [ "$ref": "#/components/schemas/Colorspace"
{
"$ref": "#/components/schemas/Colorspace"
}
]
}, },
"extractEmbedded": { "extractEmbedded": {
"type": "boolean" "type": "boolean"
}, },
"fullsizePreview": { "fullsize": {
"type": "boolean" "$ref": "#/components/schemas/SystemConfigGeneratedFullsizeImageDto"
}, },
"preview": { "preview": {
"$ref": "#/components/schemas/SystemConfigGeneratedImageDto" "$ref": "#/components/schemas/SystemConfigGeneratedImageDto"
@ -11955,7 +11829,7 @@
"required": [ "required": [
"colorspace", "colorspace",
"extractEmbedded", "extractEmbedded",
"fullsizePreview", "fullsize",
"preview", "preview",
"thumbnail" "thumbnail"
], ],
@ -12059,11 +11933,7 @@
"type": "boolean" "type": "boolean"
}, },
"level": { "level": {
"allOf": [ "$ref": "#/components/schemas/LogLevel"
{
"$ref": "#/components/schemas/LogLevel"
}
]
} }
}, },
"required": [ "required": [
@ -12092,7 +11962,6 @@
"type": "string" "type": "string"
}, },
"urls": { "urls": {
"format": "uri",
"items": { "items": {
"format": "uri", "format": "uri",
"type": "string" "type": "string"
@ -12113,14 +11982,12 @@
"SystemConfigMapDto": { "SystemConfigMapDto": {
"properties": { "properties": {
"darkStyle": { "darkStyle": {
"format": "uri",
"type": "string" "type": "string"
}, },
"enabled": { "enabled": {
"type": "boolean" "type": "boolean"
}, },
"lightStyle": { "lightStyle": {
"format": "uri",
"type": "string" "type": "string"
} }
}, },
@ -12195,7 +12062,6 @@
"type": "boolean" "type": "boolean"
}, },
"mobileRedirectUri": { "mobileRedirectUri": {
"format": "uri",
"type": "string" "type": "string"
}, },
"profileSigningAlgorithm": { "profileSigningAlgorithm": {
@ -12258,7 +12124,6 @@
"SystemConfigServerDto": { "SystemConfigServerDto": {
"properties": { "properties": {
"externalDomain": { "externalDomain": {
"format": "uri",
"type": "string" "type": "string"
}, },
"loginPageMessage": { "loginPageMessage": {
@ -12515,7 +12380,6 @@
"TagCreateDto": { "TagCreateDto": {
"properties": { "properties": {
"color": { "color": {
"pattern": "^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$",
"type": "string" "type": "string"
}, },
"name": { "name": {
@ -12571,7 +12435,6 @@
"properties": { "properties": {
"color": { "color": {
"nullable": true, "nullable": true,
"pattern": "^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$",
"type": "string" "type": "string"
} }
}, },
@ -12734,11 +12597,7 @@
"type": "boolean" "type": "boolean"
}, },
"order": { "order": {
"allOf": [ "$ref": "#/components/schemas/AssetOrder"
{
"$ref": "#/components/schemas/AssetOrder"
}
]
} }
}, },
"type": "object" "type": "object"
@ -12746,11 +12605,7 @@
"UpdateAlbumUserDto": { "UpdateAlbumUserDto": {
"properties": { "properties": {
"role": { "role": {
"allOf": [ "$ref": "#/components/schemas/AlbumUserRole"
{
"$ref": "#/components/schemas/AlbumUserRole"
}
]
} }
}, },
"required": [ "required": [
@ -12797,17 +12652,13 @@
"items": { "items": {
"type": "string" "type": "string"
}, },
"maxItems": 128, "type": "array"
"type": "array",
"uniqueItems": true
}, },
"importPaths": { "importPaths": {
"items": { "items": {
"type": "string" "type": "string"
}, },
"maxItems": 128, "type": "array"
"type": "array",
"uniqueItems": true
}, },
"name": { "name": {
"type": "string" "type": "string"
@ -12873,7 +12724,6 @@
"UserAdminCreateDto": { "UserAdminCreateDto": {
"properties": { "properties": {
"email": { "email": {
"format": "email",
"type": "string" "type": "string"
}, },
"name": { "name": {
@ -12917,11 +12767,7 @@
"UserAdminResponseDto": { "UserAdminResponseDto": {
"properties": { "properties": {
"avatarColor": { "avatarColor": {
"allOf": [ "$ref": "#/components/schemas/UserAvatarColor"
{
"$ref": "#/components/schemas/UserAvatarColor"
}
]
}, },
"createdAt": { "createdAt": {
"format": "date-time", "format": "date-time",
@ -12976,11 +12822,7 @@
"type": "boolean" "type": "boolean"
}, },
"status": { "status": {
"allOf": [ "$ref": "#/components/schemas/UserStatus"
{
"$ref": "#/components/schemas/UserStatus"
}
]
}, },
"storageLabel": { "storageLabel": {
"nullable": true, "nullable": true,
@ -13015,7 +12857,6 @@
"UserAdminUpdateDto": { "UserAdminUpdateDto": {
"properties": { "properties": {
"email": { "email": {
"format": "email",
"type": "string" "type": "string"
}, },
"name": { "name": {
@ -13153,11 +12994,7 @@
"UserResponseDto": { "UserResponseDto": {
"properties": { "properties": {
"avatarColor": { "avatarColor": {
"allOf": [ "$ref": "#/components/schemas/UserAvatarColor"
{
"$ref": "#/components/schemas/UserAvatarColor"
}
]
}, },
"email": { "email": {
"type": "string" "type": "string"
@ -13197,7 +13034,6 @@
"UserUpdateMeDto": { "UserUpdateMeDto": {
"properties": { "properties": {
"email": { "email": {
"format": "email",
"type": "string" "type": "string"
}, },
"name": { "name": {
@ -13226,17 +13062,13 @@
"items": { "items": {
"type": "string" "type": "string"
}, },
"maxItems": 128, "type": "array"
"type": "array",
"uniqueItems": true
}, },
"importPaths": { "importPaths": {
"items": { "items": {
"type": "string" "type": "string"
}, },
"maxItems": 128, "type": "array"
"type": "array",
"uniqueItems": true
} }
}, },
"type": "object" "type": "object"

View file

@ -1123,6 +1123,11 @@ export type SystemConfigFFmpegDto = {
transcode: TranscodePolicy; transcode: TranscodePolicy;
twoPass: boolean; twoPass: boolean;
}; };
export type SystemConfigGeneratedFullsizeImageDto = {
enabled: boolean;
format: ImageFormat;
quality: number;
};
export type SystemConfigGeneratedImageDto = { export type SystemConfigGeneratedImageDto = {
format: ImageFormat; format: ImageFormat;
quality: number; quality: number;
@ -1131,7 +1136,7 @@ export type SystemConfigGeneratedImageDto = {
export type SystemConfigImageDto = { export type SystemConfigImageDto = {
colorspace: Colorspace; colorspace: Colorspace;
extractEmbedded: boolean; extractEmbedded: boolean;
fullsizePreview: boolean; fullsize: SystemConfigGeneratedFullsizeImageDto;
preview: SystemConfigGeneratedImageDto; preview: SystemConfigGeneratedImageDto;
thumbnail: SystemConfigGeneratedImageDto; thumbnail: SystemConfigGeneratedImageDto;
}; };