UNPKG

stashapp-api

Version:

Easy to use adapter for interaction with a Stash server through GraphQL.

35 lines (34 loc) 1.46 kB
export type { PerformerFilterType, SceneFilterType, TagFilterType, StudioFilterType, GalleryFilterType, ImageFilterType, } from "./generated/graphql.js"; import { CriterionModifier as _CriterionModifier, GenderEnum as _GenderEnum } from "./generated/graphql.js"; export declare const CriterionModifier: typeof _CriterionModifier; export declare const GenderEnum: typeof _GenderEnum; import { getSdk } from "./generated/graphql.js"; export interface StashAppConfig { url: string; apiKey: string; } export type { Performer, Scene, Tag, Studio, Gallery, Image, } from "./generated/graphql.js"; /** * Singleton class for interacting with the Stash GraphQL API. * Provides type-safe query and mutation methods. */ export declare class StashApp { private static instance; private client; private sdk; /** Find performers */ findPerformers: ReturnType<typeof getSdk>["FindPerformers"]; /** Find studios */ findStudios: ReturnType<typeof getSdk>["FindStudios"]; /** Find scenes */ findScenes: ReturnType<typeof getSdk>["FindScenes"]; /** Find tags */ findTags: ReturnType<typeof getSdk>["FindTags"]; /** Update a scene */ sceneUpdate: ReturnType<typeof getSdk>["sceneUpdate"]; /** Run a metadata scan */ metadataScan: ReturnType<typeof getSdk>["MetadataScan"]; private constructor(); /** Initialize the singleton StashApp instance */ static init(config: StashAppConfig): StashApp; }