feat: exclude source photos from automatic selection
Community checks / verify (push) Skipped
Verify Frame Flow / verify (push) Successful in 5m53s

This commit is contained in:
渡口浪人
2026-10-20 18:50:43 +08:00
parent e6a3974d08
commit 383ed45185
17 changed files with 735 additions and 23 deletions
+404 -1
View File
@@ -14510,6 +14510,340 @@
}
}
}
},
"/api/v1/assets/{asset_id}/exclusion": {
"put": {
"tags": [
"Images"
],
"summary": "Exclude Asset",
"operationId": "exclude_asset_api_v1_assets__asset_id__exclusion_put",
"security": [
{
"HTTPBearer": []
},
{
"AccountSession": []
}
],
"parameters": [
{
"name": "asset_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Asset Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ImageExclusion"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Asset"
}
}
}
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Bad Request"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Unauthorized"
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Forbidden"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Not Found"
},
"409": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Conflict"
},
"413": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Content Too Large"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Unprocessable Content"
},
"429": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Too Many Requests"
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Internal Server Error"
},
"502": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Bad Gateway"
},
"503": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Service Unavailable"
}
}
}
},
"/api/v1/photo-sources/{source_id}/preferences": {
"put": {
"tags": [
"Photo sources"
],
"summary": "Source Preference",
"operationId": "source_preference_api_v1_photo_sources__source_id__preferences_put",
"security": [
{
"HTTPBearer": []
},
{
"AccountSession": []
}
],
"parameters": [
{
"name": "source_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Source Id"
}
},
{
"name": "device_id",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Device Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PhotoPreference"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Bad Request"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Unauthorized"
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Forbidden"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Not Found"
},
"409": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Conflict"
},
"413": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Content Too Large"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Unprocessable Content"
},
"429": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Too Many Requests"
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Internal Server Error"
},
"502": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Bad Gateway"
},
"503": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Service Unavailable"
}
}
}
}
},
"components": {
@@ -14595,6 +14929,11 @@
},
"Asset": {
"properties": {
"excluded": {
"type": "boolean",
"title": "Excluded",
"default": false
},
"source_path": {
"anyOf": [
{
@@ -14696,7 +15035,9 @@
"enum": [
"delete",
"star",
"unstar"
"unstar",
"exclude",
"include"
],
"title": "Action"
}
@@ -16608,6 +16949,16 @@
},
"PhotoItem": {
"properties": {
"starred": {
"type": "boolean",
"title": "Starred",
"default": false
},
"excluded": {
"type": "boolean",
"title": "Excluded",
"default": false
},
"id": {
"type": "string",
"title": "Id"
@@ -18174,6 +18525,58 @@
"operation_ids"
],
"title": "HistoryDelete"
},
"ImageExclusion": {
"properties": {
"excluded": {
"type": "boolean",
"title": "Excluded"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"excluded"
],
"title": "ImageExclusion"
},
"PhotoPreference": {
"properties": {
"item_id": {
"type": "string",
"maxLength": 4096,
"minLength": 1,
"title": "Item Id"
},
"starred": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Starred"
},
"excluded": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Excluded"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"item_id"
],
"title": "PhotoPreference"
}
},
"securitySchemes": {