Bilder
Funktionsunterstützung über app.capabilities prüfen, Autorisierung über app.access und Host-Berechtigungen. Die Beispiele verwenden synthetische Werte; vor dem Aufruf Pfade, IDs, Eingaben und Filter ersetzen.
Typdefinitionen
type Subscription {
imageModelsUpdated: ImageModelsUpdate!
}
type Mutation {
cancelImageIndex: Boolean!
cancelImageModelDownload: Boolean!
disableImageSearch: Boolean!
enableImageSearch: Boolean!
importImageSearchModel: Boolean!
startImageIndex(force: Boolean): Boolean!
}
type Query {
imageCount(query: String!): Int!
imageSearchStatus: ImageSearchStatus!
images(query: String!, offset: Int!, limit: Int!, sortBy: ImageSortBy!): [Image!]!
}
enum DataType {
DEFAULT
AUDIO
VIDEO
IMAGE
SMS
CONTACT
NOTE
FEED_ENTRY
CALL
PACKAGE
FILE
APP_FILE
DOC
}
type Image implements MediaItem {
id: ID!
title: String!
path: String!
size: Long!
width: Int!
height: Int!
rotation: Int!
bucketId: ID!
createdAt: Instant!
updatedAt: Instant!
takenAt: Instant
isFavorite: Boolean!
tags: [Tag!]!
}
type ImageModelsUpdate {
version: Long!
status: ImageSearchStatusType!
downloadProgress: Int!
errorMessage: String!
modelSize: Long!
modelDir: String!
isIndexing: Boolean!
totalImages: Int!
indexedImages: Int!
}
type ImageSearchStatus {
status: ImageSearchStatusType!
downloadProgress: Int!
errorMessage: String!
modelSize: Long!
modelDir: String!
isIndexing: Boolean!
totalImages: Int!
indexedImages: Int!
}
enum ImageSearchStatusType {
UNAVAILABLE
DOWNLOADING
LOADING
READY
ERROR
}
enum ImageSortBy {
UPDATED_AT_ASC
UPDATED_AT_DESC
SIZE_ASC
SIZE_DESC
NAME_ASC
NAME_DESC
TAKEN_AT_DESC
}
scalar Instant
scalar Long
interface MediaItem {
id: ID!
title: String!
path: String!
size: Long!
bucketId: ID!
createdAt: Instant!
updatedAt: Instant!
}
type Tag {
id: ID!
name: String!
type: DataType!
count: Int!
}Operationen
imageModelsUpdated
Empfängt Änderungen zu Download oder Verfügbarkeit des Bildsuchmodells.
subscription imageModelsUpdated {
imageModelsUpdated { version status downloadProgress errorMessage modelSize modelDir isIndexing totalImages }
}cancelImageIndex
Bricht den laufenden Indizierungsvorgang ab.
mutation cancelImageIndex {
cancelImageIndex
}cancelImageModelDownload
Bricht den laufenden Download des KI-Modells ab.
mutation cancelImageModelDownload {
cancelImageModelDownload
}disableImageSearch
Deaktiviert die semantische KI-Bildsuche und gibt Ressourcen frei.
mutation disableImageSearch {
disableImageSearch
}enableImageSearch
Aktiviert die semantische KI-Bildsuche. Lädt das lokale Modell herunter, falls es fehlt.
mutation enableImageSearch {
enableImageSearch
}importImageSearchModel
Prüft und aktiviert ein vollständig hochgeladenes Modellpaket für die Bildsuche.
mutation importImageSearchModel {
importImageSearchModel
}startImageIndex
Startet die Bildindizierung für die KI-Suche. force=true indiziert alles erneut.
# `force` re-scans images that already have an embedding.
mutation startImageIndex($force: Boolean) {
startImageIndex(force: $force)
}imageCount
Zählt Bilder, die einer Abfrage entsprechen.
query imageCount($query: String!) {
imageCount(query: $query)
}imageSearchStatus
Liest den aktuellen Indizierungsstatus der semantischen KI-Suche.
query imageSearchStatus {
imageSearchStatus { status downloadProgress errorMessage modelSize modelDir isIndexing totalImages indexedImages }
}images
Durchsucht den Bildkatalog mit Filtern, Seitennavigation und Sortierung.
query images($query: String!, $offset: Int!, $limit: Int!, $sortBy: ImageSortBy!) {
images(query: $query, offset: $offset, limit: $limit, sortBy: $sortBy) { id title path size width height rotation bucketId }
}