mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Update GQLGen and break up the schema.graphql file
This commit is contained in:
11
graphql/documents/data/config.graphql
Normal file
11
graphql/documents/data/config.graphql
Normal file
@@ -0,0 +1,11 @@
|
||||
fragment ConfigGeneralData on ConfigGeneralResult {
|
||||
stashes
|
||||
databasePath
|
||||
generatedPath
|
||||
}
|
||||
|
||||
fragment ConfigData on ConfigResult {
|
||||
general {
|
||||
...ConfigGeneralData
|
||||
}
|
||||
}
|
||||
11
graphql/documents/data/gallery.graphql
Normal file
11
graphql/documents/data/gallery.graphql
Normal file
@@ -0,0 +1,11 @@
|
||||
fragment GalleryData on Gallery {
|
||||
id
|
||||
checksum
|
||||
path
|
||||
title
|
||||
files {
|
||||
index
|
||||
name
|
||||
path
|
||||
}
|
||||
}
|
||||
5
graphql/documents/data/performer-slim.graphql
Normal file
5
graphql/documents/data/performer-slim.graphql
Normal file
@@ -0,0 +1,5 @@
|
||||
fragment SlimPerformerData on Performer {
|
||||
id
|
||||
name
|
||||
image_path
|
||||
}
|
||||
22
graphql/documents/data/performer.graphql
Normal file
22
graphql/documents/data/performer.graphql
Normal file
@@ -0,0 +1,22 @@
|
||||
fragment PerformerData on Performer {
|
||||
id
|
||||
checksum
|
||||
name
|
||||
url
|
||||
twitter
|
||||
instagram
|
||||
birthdate
|
||||
ethnicity
|
||||
country
|
||||
eye_color
|
||||
height
|
||||
measurements
|
||||
fake_tits
|
||||
career_length
|
||||
tattoos
|
||||
piercings
|
||||
aliases
|
||||
favorite
|
||||
image_path
|
||||
scene_count
|
||||
}
|
||||
21
graphql/documents/data/scene-marker.graphql
Normal file
21
graphql/documents/data/scene-marker.graphql
Normal file
@@ -0,0 +1,21 @@
|
||||
fragment SceneMarkerData on SceneMarker {
|
||||
id
|
||||
title
|
||||
seconds
|
||||
stream
|
||||
preview
|
||||
|
||||
scene {
|
||||
id
|
||||
}
|
||||
|
||||
primary_tag {
|
||||
id
|
||||
name
|
||||
}
|
||||
|
||||
tags {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
60
graphql/documents/data/scene-slim.graphql
Normal file
60
graphql/documents/data/scene-slim.graphql
Normal file
@@ -0,0 +1,60 @@
|
||||
fragment SlimSceneData on Scene {
|
||||
id
|
||||
checksum
|
||||
title
|
||||
details
|
||||
url
|
||||
date
|
||||
rating
|
||||
path
|
||||
|
||||
file {
|
||||
size
|
||||
duration
|
||||
video_codec
|
||||
audio_codec
|
||||
width
|
||||
height
|
||||
framerate
|
||||
bitrate
|
||||
}
|
||||
|
||||
paths {
|
||||
screenshot
|
||||
preview
|
||||
stream
|
||||
webp
|
||||
vtt
|
||||
chapters_vtt
|
||||
}
|
||||
|
||||
scene_markers {
|
||||
id
|
||||
title
|
||||
seconds
|
||||
}
|
||||
|
||||
gallery {
|
||||
id
|
||||
path
|
||||
title
|
||||
}
|
||||
|
||||
studio {
|
||||
id
|
||||
name
|
||||
image_path
|
||||
}
|
||||
|
||||
tags {
|
||||
id
|
||||
name
|
||||
}
|
||||
|
||||
performers {
|
||||
id
|
||||
name
|
||||
favorite
|
||||
image_path
|
||||
}
|
||||
}
|
||||
52
graphql/documents/data/scene.graphql
Normal file
52
graphql/documents/data/scene.graphql
Normal file
@@ -0,0 +1,52 @@
|
||||
fragment SceneData on Scene {
|
||||
id
|
||||
checksum
|
||||
title
|
||||
details
|
||||
url
|
||||
date
|
||||
rating
|
||||
path
|
||||
|
||||
file {
|
||||
size
|
||||
duration
|
||||
video_codec
|
||||
audio_codec
|
||||
width
|
||||
height
|
||||
framerate
|
||||
bitrate
|
||||
}
|
||||
|
||||
paths {
|
||||
screenshot
|
||||
preview
|
||||
stream
|
||||
webp
|
||||
vtt
|
||||
chapters_vtt
|
||||
}
|
||||
|
||||
scene_markers {
|
||||
...SceneMarkerData
|
||||
}
|
||||
|
||||
is_streamable
|
||||
|
||||
gallery {
|
||||
...GalleryData
|
||||
}
|
||||
|
||||
studio {
|
||||
...StudioData
|
||||
}
|
||||
|
||||
tags {
|
||||
...TagData
|
||||
}
|
||||
|
||||
performers {
|
||||
...PerformerData
|
||||
}
|
||||
}
|
||||
5
graphql/documents/data/studio-slim.graphql
Normal file
5
graphql/documents/data/studio-slim.graphql
Normal file
@@ -0,0 +1,5 @@
|
||||
fragment SlimStudioData on Studio {
|
||||
id
|
||||
name
|
||||
image_path
|
||||
}
|
||||
8
graphql/documents/data/studio.graphql
Normal file
8
graphql/documents/data/studio.graphql
Normal file
@@ -0,0 +1,8 @@
|
||||
fragment StudioData on Studio {
|
||||
id
|
||||
checksum
|
||||
name
|
||||
url
|
||||
image_path
|
||||
scene_count
|
||||
}
|
||||
6
graphql/documents/data/tag.graphql
Normal file
6
graphql/documents/data/tag.graphql
Normal file
@@ -0,0 +1,6 @@
|
||||
fragment TagData on Tag {
|
||||
id
|
||||
name
|
||||
scene_count
|
||||
scene_marker_count
|
||||
}
|
||||
5
graphql/documents/mutations/config.graphql
Normal file
5
graphql/documents/mutations/config.graphql
Normal file
@@ -0,0 +1,5 @@
|
||||
mutation ConfigureGeneral($input: ConfigGeneralInput!) {
|
||||
configureGeneral(input: $input) {
|
||||
...ConfigGeneralData
|
||||
}
|
||||
}
|
||||
85
graphql/documents/mutations/performer.graphql
Normal file
85
graphql/documents/mutations/performer.graphql
Normal file
@@ -0,0 +1,85 @@
|
||||
mutation PerformerCreate(
|
||||
$name: String,
|
||||
$url: String,
|
||||
$birthdate: String,
|
||||
$ethnicity: String,
|
||||
$country: String,
|
||||
$eye_color: String,
|
||||
$height: String,
|
||||
$measurements: String,
|
||||
$fake_tits: String,
|
||||
$career_length: String,
|
||||
$tattoos: String,
|
||||
$piercings: String,
|
||||
$aliases: String,
|
||||
$twitter: String,
|
||||
$instagram: String,
|
||||
$favorite: Boolean,
|
||||
$image: String!) {
|
||||
|
||||
performerCreate(input: {
|
||||
name: $name,
|
||||
url: $url,
|
||||
birthdate: $birthdate,
|
||||
ethnicity: $ethnicity,
|
||||
country: $country,
|
||||
eye_color: $eye_color,
|
||||
height: $height,
|
||||
measurements: $measurements,
|
||||
fake_tits: $fake_tits,
|
||||
career_length: $career_length,
|
||||
tattoos: $tattoos,
|
||||
piercings: $piercings,
|
||||
aliases: $aliases,
|
||||
twitter: $twitter,
|
||||
instagram: $instagram,
|
||||
favorite: $favorite,
|
||||
image: $image
|
||||
}) {
|
||||
...PerformerData
|
||||
}
|
||||
}
|
||||
|
||||
mutation PerformerUpdate(
|
||||
$id: ID!,
|
||||
$name: String,
|
||||
$url: String,
|
||||
$birthdate: String,
|
||||
$ethnicity: String,
|
||||
$country: String,
|
||||
$eye_color: String,
|
||||
$height: String,
|
||||
$measurements: String,
|
||||
$fake_tits: String,
|
||||
$career_length: String,
|
||||
$tattoos: String,
|
||||
$piercings: String,
|
||||
$aliases: String,
|
||||
$twitter: String,
|
||||
$instagram: String,
|
||||
$favorite: Boolean,
|
||||
$image: String) {
|
||||
|
||||
performerUpdate(input: {
|
||||
id: $id,
|
||||
name: $name,
|
||||
url: $url,
|
||||
birthdate: $birthdate,
|
||||
ethnicity: $ethnicity,
|
||||
country: $country,
|
||||
eye_color: $eye_color,
|
||||
height: $height,
|
||||
measurements: $measurements,
|
||||
fake_tits: $fake_tits,
|
||||
career_length: $career_length,
|
||||
tattoos: $tattoos,
|
||||
piercings: $piercings,
|
||||
aliases: $aliases,
|
||||
twitter: $twitter,
|
||||
instagram: $instagram,
|
||||
favorite: $favorite,
|
||||
image: $image
|
||||
}) {
|
||||
...PerformerData
|
||||
}
|
||||
}
|
||||
41
graphql/documents/mutations/scene-marker.graphql
Normal file
41
graphql/documents/mutations/scene-marker.graphql
Normal file
@@ -0,0 +1,41 @@
|
||||
mutation SceneMarkerCreate(
|
||||
$title: String!,
|
||||
$seconds: Float!,
|
||||
$scene_id: ID!,
|
||||
$primary_tag_id: ID!,
|
||||
$tag_ids: [ID!] = []) {
|
||||
|
||||
sceneMarkerCreate(input: {
|
||||
title: $title,
|
||||
seconds: $seconds,
|
||||
scene_id: $scene_id,
|
||||
primary_tag_id: $primary_tag_id,
|
||||
tag_ids: $tag_ids
|
||||
}) {
|
||||
...SceneMarkerData
|
||||
}
|
||||
}
|
||||
|
||||
mutation SceneMarkerUpdate(
|
||||
$id: ID!,
|
||||
$title: String!,
|
||||
$seconds: Float!,
|
||||
$scene_id: ID!,
|
||||
$primary_tag_id: ID!,
|
||||
$tag_ids: [ID!] = []) {
|
||||
|
||||
sceneMarkerUpdate(input: {
|
||||
id: $id,
|
||||
title: $title,
|
||||
seconds: $seconds,
|
||||
scene_id: $scene_id,
|
||||
primary_tag_id: $primary_tag_id,
|
||||
tag_ids: $tag_ids
|
||||
}) {
|
||||
...SceneMarkerData
|
||||
}
|
||||
}
|
||||
|
||||
mutation SceneMarkerDestroy($id: ID!) {
|
||||
sceneMarkerDestroy(id: $id)
|
||||
}
|
||||
27
graphql/documents/mutations/scene.graphql
Normal file
27
graphql/documents/mutations/scene.graphql
Normal file
@@ -0,0 +1,27 @@
|
||||
mutation SceneUpdate(
|
||||
$id: ID!,
|
||||
$title: String,
|
||||
$details: String,
|
||||
$url: String,
|
||||
$date: String,
|
||||
$rating: Int,
|
||||
$studio_id: ID,
|
||||
$gallery_id: ID,
|
||||
$performer_ids: [ID!] = [],
|
||||
$tag_ids: [ID!] = []) {
|
||||
|
||||
sceneUpdate(input: {
|
||||
id: $id,
|
||||
title: $title,
|
||||
details: $details,
|
||||
url: $url,
|
||||
date: $date,
|
||||
rating: $rating,
|
||||
studio_id: $studio_id,
|
||||
gallery_id: $gallery_id,
|
||||
performer_ids: $performer_ids,
|
||||
tag_ids: $tag_ids
|
||||
}) {
|
||||
...SceneData
|
||||
}
|
||||
}
|
||||
20
graphql/documents/mutations/studio.graphql
Normal file
20
graphql/documents/mutations/studio.graphql
Normal file
@@ -0,0 +1,20 @@
|
||||
mutation StudioCreate(
|
||||
$name: String!,
|
||||
$url: String,
|
||||
$image: String!) {
|
||||
|
||||
studioCreate(input: { name: $name, url: $url, image: $image }) {
|
||||
...StudioData
|
||||
}
|
||||
}
|
||||
|
||||
mutation StudioUpdate(
|
||||
$id: ID!
|
||||
$name: String,
|
||||
$url: String,
|
||||
$image: String) {
|
||||
|
||||
studioUpdate(input: { id: $id, name: $name, url: $url, image: $image }) {
|
||||
...StudioData
|
||||
}
|
||||
}
|
||||
15
graphql/documents/mutations/tag.graphql
Normal file
15
graphql/documents/mutations/tag.graphql
Normal file
@@ -0,0 +1,15 @@
|
||||
mutation TagCreate($name: String!) {
|
||||
tagCreate(input: { name: $name }) {
|
||||
...TagData
|
||||
}
|
||||
}
|
||||
|
||||
mutation TagDestroy($id: ID!) {
|
||||
tagDestroy(input: { id: $id })
|
||||
}
|
||||
|
||||
mutation TagUpdate($id: ID!, $name: String!) {
|
||||
tagUpdate(input: { id: $id, name: $name }) {
|
||||
...TagData
|
||||
}
|
||||
}
|
||||
14
graphql/documents/queries/gallery.graphql
Normal file
14
graphql/documents/queries/gallery.graphql
Normal file
@@ -0,0 +1,14 @@
|
||||
query FindGalleries($filter: FindFilterType) {
|
||||
findGalleries(filter: $filter) {
|
||||
count
|
||||
galleries {
|
||||
...GalleryData
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query FindGallery($id: ID!) {
|
||||
findGallery(id: $id) {
|
||||
...GalleryData
|
||||
}
|
||||
}
|
||||
11
graphql/documents/queries/legacy.graphql
Normal file
11
graphql/documents/queries/legacy.graphql
Normal file
@@ -0,0 +1,11 @@
|
||||
query SceneWall($q: String) {
|
||||
sceneWall(q: $q) {
|
||||
...SceneData
|
||||
}
|
||||
}
|
||||
|
||||
query MarkerWall($q: String) {
|
||||
markerWall(q: $q) {
|
||||
...SceneMarkerData
|
||||
}
|
||||
}
|
||||
55
graphql/documents/queries/misc.graphql
Normal file
55
graphql/documents/queries/misc.graphql
Normal file
@@ -0,0 +1,55 @@
|
||||
query FindTag($id: ID!) {
|
||||
findTag(id: $id) {
|
||||
...TagData
|
||||
}
|
||||
}
|
||||
|
||||
query MarkerStrings($q: String, $sort: String) {
|
||||
markerStrings(q: $q, sort: $sort) {
|
||||
id
|
||||
count
|
||||
title
|
||||
}
|
||||
}
|
||||
|
||||
query AllTags {
|
||||
allTags {
|
||||
...TagData
|
||||
}
|
||||
}
|
||||
|
||||
query AllPerformersForFilter {
|
||||
allPerformers {
|
||||
...SlimPerformerData
|
||||
}
|
||||
}
|
||||
|
||||
query AllStudiosForFilter {
|
||||
allStudios {
|
||||
...SlimStudioData
|
||||
}
|
||||
}
|
||||
|
||||
query AllTagsForFilter {
|
||||
allTags {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
|
||||
query ValidGalleriesForScene($scene_id: ID!) {
|
||||
validGalleriesForScene(scene_id: $scene_id) {
|
||||
id
|
||||
path
|
||||
}
|
||||
}
|
||||
|
||||
query Stats {
|
||||
stats {
|
||||
scene_count,
|
||||
gallery_count,
|
||||
performer_count,
|
||||
studio_count,
|
||||
tag_count
|
||||
}
|
||||
}
|
||||
14
graphql/documents/queries/performer.graphql
Normal file
14
graphql/documents/queries/performer.graphql
Normal file
@@ -0,0 +1,14 @@
|
||||
query FindPerformers($filter: FindFilterType, $performer_filter: PerformerFilterType) {
|
||||
findPerformers(filter: $filter, performer_filter: $performer_filter) {
|
||||
count
|
||||
performers {
|
||||
...PerformerData
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query FindPerformer($id: ID!) {
|
||||
findPerformer(id: $id) {
|
||||
...PerformerData
|
||||
}
|
||||
}
|
||||
8
graphql/documents/queries/scene-marker.graphql
Normal file
8
graphql/documents/queries/scene-marker.graphql
Normal file
@@ -0,0 +1,8 @@
|
||||
query FindSceneMarkers($filter: FindFilterType, $scene_marker_filter: SceneMarkerFilterType) {
|
||||
findSceneMarkers(filter: $filter, scene_marker_filter: $scene_marker_filter) {
|
||||
count
|
||||
scene_markers {
|
||||
...SceneMarkerData
|
||||
}
|
||||
}
|
||||
}
|
||||
24
graphql/documents/queries/scene.graphql
Normal file
24
graphql/documents/queries/scene.graphql
Normal file
@@ -0,0 +1,24 @@
|
||||
query FindScenes($filter: FindFilterType, $scene_filter: SceneFilterType, $scene_ids: [Int!]) {
|
||||
findScenes(filter: $filter, scene_filter: $scene_filter, scene_ids: $scene_ids) {
|
||||
count
|
||||
scenes {
|
||||
...SlimSceneData
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query FindScene($id: ID!, $checksum: String) {
|
||||
findScene(id: $id, checksum: $checksum) {
|
||||
...SceneData
|
||||
}
|
||||
|
||||
sceneMarkerTags(scene_id: $id) {
|
||||
tag {
|
||||
id
|
||||
name
|
||||
}
|
||||
scene_markers {
|
||||
...SceneMarkerData
|
||||
}
|
||||
}
|
||||
}
|
||||
23
graphql/documents/queries/scrapers/freeones.graphql
Normal file
23
graphql/documents/queries/scrapers/freeones.graphql
Normal file
@@ -0,0 +1,23 @@
|
||||
query ScrapeFreeones($performer_name: String!) {
|
||||
scrapeFreeones(performer_name: $performer_name) {
|
||||
name
|
||||
url
|
||||
twitter
|
||||
instagram
|
||||
birthdate
|
||||
ethnicity
|
||||
country
|
||||
eye_color
|
||||
height
|
||||
measurements
|
||||
fake_tits
|
||||
career_length
|
||||
tattoos
|
||||
piercings
|
||||
aliases
|
||||
}
|
||||
}
|
||||
|
||||
query ScrapeFreeonesPerformers($q: String!) {
|
||||
scrapeFreeonesPerformerList(query: $q)
|
||||
}
|
||||
9
graphql/documents/queries/settings/config.graphql
Normal file
9
graphql/documents/queries/settings/config.graphql
Normal file
@@ -0,0 +1,9 @@
|
||||
query Configuration {
|
||||
configuration {
|
||||
...ConfigData
|
||||
}
|
||||
}
|
||||
|
||||
query Directories($path: String) {
|
||||
directories(path: $path)
|
||||
}
|
||||
19
graphql/documents/queries/settings/metadata.graphql
Normal file
19
graphql/documents/queries/settings/metadata.graphql
Normal file
@@ -0,0 +1,19 @@
|
||||
query MetadataImport {
|
||||
metadataImport
|
||||
}
|
||||
|
||||
query MetadataExport {
|
||||
metadataExport
|
||||
}
|
||||
|
||||
query MetadataScan {
|
||||
metadataScan
|
||||
}
|
||||
|
||||
query MetadataGenerate($input: GenerateMetadataInput!) {
|
||||
metadataGenerate(input: $input)
|
||||
}
|
||||
|
||||
query MetadataClean {
|
||||
metadataClean
|
||||
}
|
||||
14
graphql/documents/queries/studio.graphql
Normal file
14
graphql/documents/queries/studio.graphql
Normal file
@@ -0,0 +1,14 @@
|
||||
query FindStudios($filter: FindFilterType) {
|
||||
findStudios(filter: $filter) {
|
||||
count
|
||||
studios {
|
||||
...StudioData
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query FindStudio($id: ID!) {
|
||||
findStudio(id: $id) {
|
||||
...StudioData
|
||||
}
|
||||
}
|
||||
3
graphql/documents/subscriptions.graphql
Normal file
3
graphql/documents/subscriptions.graphql
Normal file
@@ -0,0 +1,3 @@
|
||||
subscription MetadataUpdate {
|
||||
metadataUpdate
|
||||
}
|
||||
103
graphql/schema/schema.graphql
Normal file
103
graphql/schema/schema.graphql
Normal file
@@ -0,0 +1,103 @@
|
||||
"""The query root for this schema"""
|
||||
type Query {
|
||||
"""Find a scene by ID or Checksum"""
|
||||
findScene(id: ID, checksum: String): Scene
|
||||
"""A function which queries Scene objects"""
|
||||
findScenes(scene_filter: SceneFilterType, scene_ids: [Int!], filter: FindFilterType): FindScenesResultType!
|
||||
|
||||
"""A function which queries SceneMarker objects"""
|
||||
findSceneMarkers(scene_marker_filter: SceneMarkerFilterType filter: FindFilterType): FindSceneMarkersResultType!
|
||||
|
||||
"""Find a performer by ID"""
|
||||
findPerformer(id: ID!): Performer
|
||||
"""A function which queries Performer objects"""
|
||||
findPerformers(performer_filter: PerformerFilterType, filter: FindFilterType): FindPerformersResultType!
|
||||
|
||||
"""Find a studio by ID"""
|
||||
findStudio(id: ID!): Studio
|
||||
"""A function which queries Studio objects"""
|
||||
findStudios(filter: FindFilterType): FindStudiosResultType!
|
||||
|
||||
findGallery(id: ID!): Gallery
|
||||
findGalleries(filter: FindFilterType): FindGalleriesResultType!
|
||||
|
||||
findTag(id: ID!): Tag
|
||||
|
||||
"""Retrieve random scene markers for the wall"""
|
||||
markerWall(q: String): [SceneMarker!]!
|
||||
"""Retrieve random scenes for the wall"""
|
||||
sceneWall(q: String): [Scene!]!
|
||||
|
||||
"""Get marker strings"""
|
||||
markerStrings(q: String, sort: String): [MarkerStringsResultType]!
|
||||
"""Get the list of valid galleries for a given scene ID"""
|
||||
validGalleriesForScene(scene_id: ID): [Gallery!]!
|
||||
"""Get stats"""
|
||||
stats: StatsResultType!
|
||||
"""Organize scene markers by tag for a given scene ID"""
|
||||
sceneMarkerTags(scene_id: ID!): [SceneMarkerTag!]!
|
||||
|
||||
# Scrapers
|
||||
|
||||
"""Scrape a performer using Freeones"""
|
||||
scrapeFreeones(performer_name: String!): ScrapedPerformer
|
||||
"""Scrape a list of performers from a query"""
|
||||
scrapeFreeonesPerformerList(query: String!): [String!]!
|
||||
|
||||
# Config
|
||||
"""Returns the current, complete configuration"""
|
||||
configuration: ConfigResult!
|
||||
"""Returns an array of paths for the given path"""
|
||||
directories(path: String): [String!]!
|
||||
|
||||
# Metadata
|
||||
|
||||
"""Start an import. Returns the job ID"""
|
||||
metadataImport: String!
|
||||
"""Start an export. Returns the job ID"""
|
||||
metadataExport: String!
|
||||
"""Start a scan. Returns the job ID"""
|
||||
metadataScan: String!
|
||||
"""Start generating content. Returns the job ID"""
|
||||
metadataGenerate(input: GenerateMetadataInput!): String!
|
||||
"""Clean metadata. Returns the job ID"""
|
||||
metadataClean: String!
|
||||
|
||||
# Get everything
|
||||
|
||||
allPerformers: [Performer!]!
|
||||
allStudios: [Studio!]!
|
||||
allTags: [Tag!]!
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
sceneUpdate(input: SceneUpdateInput!): Scene
|
||||
|
||||
sceneMarkerCreate(input: SceneMarkerCreateInput!): SceneMarker
|
||||
sceneMarkerUpdate(input: SceneMarkerUpdateInput!): SceneMarker
|
||||
sceneMarkerDestroy(id: ID!): Boolean!
|
||||
|
||||
performerCreate(input: PerformerCreateInput!): Performer
|
||||
performerUpdate(input: PerformerUpdateInput!): Performer
|
||||
|
||||
studioCreate(input: StudioCreateInput!): Studio
|
||||
studioUpdate(input: StudioUpdateInput!): Studio
|
||||
|
||||
tagCreate(input: TagCreateInput!): Tag
|
||||
tagUpdate(input: TagUpdateInput!): Tag
|
||||
tagDestroy(input: TagDestroyInput!): Boolean!
|
||||
|
||||
"""Change general configuration options"""
|
||||
configureGeneral(input: ConfigGeneralInput!): ConfigGeneralResult!
|
||||
}
|
||||
|
||||
type Subscription {
|
||||
"""Update from the metadata manager"""
|
||||
metadataUpdate: String!
|
||||
}
|
||||
|
||||
schema {
|
||||
query: Query
|
||||
mutation: Mutation
|
||||
subscription: Subscription
|
||||
}
|
||||
22
graphql/schema/types/config.graphql
Normal file
22
graphql/schema/types/config.graphql
Normal file
@@ -0,0 +1,22 @@
|
||||
input ConfigGeneralInput {
|
||||
"""Array of file paths to content"""
|
||||
stashes: [String!]
|
||||
"""Path to the SQLite database"""
|
||||
databasePath: String
|
||||
"""Path to generated files"""
|
||||
generatedPath: String
|
||||
}
|
||||
|
||||
type ConfigGeneralResult {
|
||||
"""Array of file paths to content"""
|
||||
stashes: [String!]!
|
||||
"""Path to the SQLite database"""
|
||||
databasePath: String!
|
||||
"""Path to generated files"""
|
||||
generatedPath: String!
|
||||
}
|
||||
|
||||
"""All configuration settings"""
|
||||
type ConfigResult {
|
||||
general: ConfigGeneralResult!
|
||||
}
|
||||
75
graphql/schema/types/filters.graphql
Normal file
75
graphql/schema/types/filters.graphql
Normal file
@@ -0,0 +1,75 @@
|
||||
enum SortDirectionEnum {
|
||||
ASC
|
||||
DESC
|
||||
}
|
||||
|
||||
input FindFilterType {
|
||||
q: String
|
||||
page: Int
|
||||
per_page: Int
|
||||
sort: String
|
||||
direction: SortDirectionEnum
|
||||
}
|
||||
|
||||
enum ResolutionEnum {
|
||||
"240p", LOW
|
||||
"480p", STANDARD
|
||||
"720p", STANDARD_HD
|
||||
"1080p", FULL_HD
|
||||
"4k", FOUR_K
|
||||
}
|
||||
|
||||
input PerformerFilterType {
|
||||
"""Filter by favorite"""
|
||||
filter_favorites: Boolean
|
||||
}
|
||||
|
||||
input SceneMarkerFilterType {
|
||||
"""Filter to only include scene markers with this tag"""
|
||||
tag_id: ID
|
||||
"""Filter to only include scene markers with these tags"""
|
||||
tags: [ID!]
|
||||
"""Filter to only include scene markers attached to a scene with these tags"""
|
||||
scene_tags: [ID!]
|
||||
"""Filter to only include scene markers with these performers"""
|
||||
performers: [ID!]
|
||||
}
|
||||
|
||||
input SceneFilterType {
|
||||
"""Filter by rating"""
|
||||
rating: IntCriterionInput
|
||||
"""Filter by resolution"""
|
||||
resolution: ResolutionEnum
|
||||
"""Filter to only include scenes which have markers. `true` or `false`"""
|
||||
has_markers: String
|
||||
"""Filter to only include scenes missing this property"""
|
||||
is_missing: String
|
||||
"""Filter to only include scenes with this studio"""
|
||||
studio_id: ID
|
||||
"""Filter to only include scenes with these tags"""
|
||||
tags: [ID!]
|
||||
"""Filter to only include scenes with this performer"""
|
||||
performer_id: ID
|
||||
}
|
||||
|
||||
enum CriterionModifier {
|
||||
"""="""
|
||||
EQUALS,
|
||||
"""!="""
|
||||
NOT_EQUALS,
|
||||
""">"""
|
||||
GREATER_THAN,
|
||||
"""<"""
|
||||
LESS_THAN,
|
||||
"""IS NULL"""
|
||||
IS_NULL,
|
||||
"""IS NOT NULL"""
|
||||
NOT_NULL,
|
||||
INCLUDES,
|
||||
EXCLUDES,
|
||||
}
|
||||
|
||||
input IntCriterionInput {
|
||||
value: Int!
|
||||
modifier: CriterionModifier!
|
||||
}
|
||||
21
graphql/schema/types/gallery.graphql
Normal file
21
graphql/schema/types/gallery.graphql
Normal file
@@ -0,0 +1,21 @@
|
||||
"""Gallery type"""
|
||||
type Gallery {
|
||||
id: ID!
|
||||
checksum: String!
|
||||
path: String!
|
||||
title: String
|
||||
|
||||
"""The files in the gallery"""
|
||||
files: [GalleryFilesType!]! # Resolver
|
||||
}
|
||||
|
||||
type GalleryFilesType {
|
||||
index: Int!
|
||||
name: String
|
||||
path: String
|
||||
}
|
||||
|
||||
type FindGalleriesResultType {
|
||||
count: Int!
|
||||
galleries: [Gallery!]!
|
||||
}
|
||||
6
graphql/schema/types/metadata.graphql
Normal file
6
graphql/schema/types/metadata.graphql
Normal file
@@ -0,0 +1,6 @@
|
||||
input GenerateMetadataInput {
|
||||
sprites: Boolean!
|
||||
previews: Boolean!
|
||||
markers: Boolean!
|
||||
transcodes: Boolean!
|
||||
}
|
||||
72
graphql/schema/types/performer.graphql
Normal file
72
graphql/schema/types/performer.graphql
Normal file
@@ -0,0 +1,72 @@
|
||||
type Performer {
|
||||
id: ID!
|
||||
checksum: String!
|
||||
name: String
|
||||
url: String
|
||||
twitter: String
|
||||
instagram: String
|
||||
birthdate: String
|
||||
ethnicity: String
|
||||
country: String
|
||||
eye_color: String
|
||||
height: String
|
||||
measurements: String
|
||||
fake_tits: String
|
||||
career_length: String
|
||||
tattoos: String
|
||||
piercings: String
|
||||
aliases: String
|
||||
favorite: Boolean!
|
||||
|
||||
image_path: String # Resolver
|
||||
scene_count: Int # Resolver
|
||||
scenes: [Scene!]!
|
||||
}
|
||||
|
||||
input PerformerCreateInput {
|
||||
name: String
|
||||
url: String
|
||||
birthdate: String
|
||||
ethnicity: String
|
||||
country: String
|
||||
eye_color: String
|
||||
height: String
|
||||
measurements: String
|
||||
fake_tits: String
|
||||
career_length: String
|
||||
tattoos: String
|
||||
piercings: String
|
||||
aliases: String
|
||||
twitter: String
|
||||
instagram: String
|
||||
favorite: Boolean
|
||||
"""This should be base64 encoded"""
|
||||
image: String!
|
||||
}
|
||||
|
||||
input PerformerUpdateInput {
|
||||
id: ID!
|
||||
name: String
|
||||
url: String
|
||||
birthdate: String
|
||||
ethnicity: String
|
||||
country: String
|
||||
eye_color: String
|
||||
height: String
|
||||
measurements: String
|
||||
fake_tits: String
|
||||
career_length: String
|
||||
tattoos: String
|
||||
piercings: String
|
||||
aliases: String
|
||||
twitter: String
|
||||
instagram: String
|
||||
favorite: Boolean
|
||||
"""This should be base64 encoded"""
|
||||
image: String
|
||||
}
|
||||
|
||||
type FindPerformersResultType {
|
||||
count: Int!
|
||||
performers: [Performer!]!
|
||||
}
|
||||
4
graphql/schema/types/scene-marker-tag.graphql
Normal file
4
graphql/schema/types/scene-marker-tag.graphql
Normal file
@@ -0,0 +1,4 @@
|
||||
type SceneMarkerTag {
|
||||
tag: Tag!
|
||||
scene_markers: [SceneMarker!]!
|
||||
}
|
||||
41
graphql/schema/types/scene-marker.graphql
Normal file
41
graphql/schema/types/scene-marker.graphql
Normal file
@@ -0,0 +1,41 @@
|
||||
type SceneMarker {
|
||||
id: ID!
|
||||
scene: Scene!
|
||||
title: String!
|
||||
seconds: Float!
|
||||
primary_tag: Tag!
|
||||
tags: [Tag!]!
|
||||
|
||||
"""The path to stream this marker"""
|
||||
stream: String! # Resolver
|
||||
"""The path to the preview image for this marker"""
|
||||
preview: String! # Resolver
|
||||
}
|
||||
|
||||
input SceneMarkerCreateInput {
|
||||
title: String!
|
||||
seconds: Float!
|
||||
scene_id: ID!
|
||||
primary_tag_id: ID!
|
||||
tag_ids: [ID!]
|
||||
}
|
||||
|
||||
input SceneMarkerUpdateInput {
|
||||
id: ID!
|
||||
title: String!
|
||||
seconds: Float!
|
||||
scene_id: ID!
|
||||
primary_tag_id: ID!
|
||||
tag_ids: [ID!]
|
||||
}
|
||||
|
||||
type FindSceneMarkersResultType {
|
||||
count: Int!
|
||||
scene_markers: [SceneMarker!]!
|
||||
}
|
||||
|
||||
type MarkerStringsResultType {
|
||||
count: Int!
|
||||
id: ID!
|
||||
title: String!
|
||||
}
|
||||
59
graphql/schema/types/scene.graphql
Normal file
59
graphql/schema/types/scene.graphql
Normal file
@@ -0,0 +1,59 @@
|
||||
type SceneFileType {
|
||||
size: String
|
||||
duration: Float
|
||||
video_codec: String
|
||||
audio_codec: String
|
||||
width: Int
|
||||
height: Int
|
||||
framerate: Float
|
||||
bitrate: Int
|
||||
}
|
||||
|
||||
type ScenePathsType {
|
||||
screenshot: String # Resolver
|
||||
preview: String # Resolver
|
||||
stream: String # Resolver
|
||||
webp: String # Resolver
|
||||
vtt: String # Resolver
|
||||
chapters_vtt: String # Resolver
|
||||
}
|
||||
|
||||
type Scene {
|
||||
id: ID!
|
||||
checksum: String!
|
||||
title: String
|
||||
details: String
|
||||
url: String
|
||||
date: String
|
||||
rating: Int
|
||||
path: String!
|
||||
|
||||
file: SceneFileType! # Resolver
|
||||
paths: ScenePathsType! # Resolver
|
||||
is_streamable: Boolean! # Resolver
|
||||
|
||||
scene_markers: [SceneMarker!]!
|
||||
gallery: Gallery
|
||||
studio: Studio
|
||||
tags: [Tag!]!
|
||||
performers: [Performer!]!
|
||||
}
|
||||
|
||||
input SceneUpdateInput {
|
||||
clientMutationId: String
|
||||
id: ID!
|
||||
title: String
|
||||
details: String
|
||||
url: String
|
||||
date: String
|
||||
rating: Int
|
||||
studio_id: ID
|
||||
gallery_id: ID
|
||||
performer_ids: [ID!]
|
||||
tag_ids: [ID!]
|
||||
}
|
||||
|
||||
type FindScenesResultType {
|
||||
count: Int!
|
||||
scenes: [Scene!]!
|
||||
}
|
||||
18
graphql/schema/types/scraped-performer.graphql
Normal file
18
graphql/schema/types/scraped-performer.graphql
Normal file
@@ -0,0 +1,18 @@
|
||||
"""A performer from a scraping operation..."""
|
||||
type ScrapedPerformer {
|
||||
name: String
|
||||
url: String
|
||||
twitter: String
|
||||
instagram: String
|
||||
birthdate: String
|
||||
ethnicity: String
|
||||
country: String
|
||||
eye_color: String
|
||||
height: String
|
||||
measurements: String
|
||||
fake_tits: String
|
||||
career_length: String
|
||||
tattoos: String
|
||||
piercings: String
|
||||
aliases: String
|
||||
}
|
||||
7
graphql/schema/types/stats.graphql
Normal file
7
graphql/schema/types/stats.graphql
Normal file
@@ -0,0 +1,7 @@
|
||||
type StatsResultType {
|
||||
scene_count: Int!
|
||||
gallery_count: Int!
|
||||
performer_count: Int!
|
||||
studio_count: Int!
|
||||
tag_count: Int!
|
||||
}
|
||||
29
graphql/schema/types/studio.graphql
Normal file
29
graphql/schema/types/studio.graphql
Normal file
@@ -0,0 +1,29 @@
|
||||
type Studio {
|
||||
id: ID!
|
||||
checksum: String!
|
||||
name: String!
|
||||
url: String
|
||||
|
||||
image_path: String # Resolver
|
||||
scene_count: Int # Resolver
|
||||
}
|
||||
|
||||
input StudioCreateInput {
|
||||
name: String!
|
||||
url: String
|
||||
"""This should be base64 encoded"""
|
||||
image: String!
|
||||
}
|
||||
|
||||
input StudioUpdateInput {
|
||||
id: ID!
|
||||
name: String
|
||||
url: String
|
||||
"""This should be base64 encoded"""
|
||||
image: String
|
||||
}
|
||||
|
||||
type FindStudiosResultType {
|
||||
count: Int!
|
||||
studios: [Studio!]!
|
||||
}
|
||||
20
graphql/schema/types/tag.graphql
Normal file
20
graphql/schema/types/tag.graphql
Normal file
@@ -0,0 +1,20 @@
|
||||
type Tag {
|
||||
id: ID!
|
||||
name: String!
|
||||
|
||||
scene_count: Int # Resolver
|
||||
scene_marker_count: Int # Resolver
|
||||
}
|
||||
|
||||
input TagCreateInput {
|
||||
name: String!
|
||||
}
|
||||
|
||||
input TagUpdateInput {
|
||||
id: ID!
|
||||
name: String!
|
||||
}
|
||||
|
||||
input TagDestroyInput {
|
||||
id: ID!
|
||||
}
|
||||
Reference in New Issue
Block a user