2023-08-05 01:03:40 +02:00
|
|
|
/*
|
|
|
|
|
* Copyright (C) Contributors to the Suwayomi project
|
|
|
|
|
*
|
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import gql from 'graphql-tag';
|
2023-11-24 03:17:49 +01:00
|
|
|
import { FULL_DOWNLOAD_STATUS } from '@/lib/graphql/Fragments';
|
2023-08-05 01:03:40 +02:00
|
|
|
|
|
|
|
|
export const CLEAR_DOWNLOADER = gql`
|
|
|
|
|
${FULL_DOWNLOAD_STATUS}
|
|
|
|
|
mutation CLEAR_DOWNLOADER($input: ClearDownloaderInput = {}) {
|
|
|
|
|
clearDownloader(input: $input) {
|
|
|
|
|
clientMutationId
|
|
|
|
|
downloadStatus {
|
|
|
|
|
...FULL_DOWNLOAD_STATUS
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const DELETE_DOWNLOADED_CHAPTER = gql`
|
|
|
|
|
mutation DELETE_DOWNLOADED_CHAPTER($input: DeleteDownloadedChapterInput!) {
|
|
|
|
|
deleteDownloadedChapter(input: $input) {
|
|
|
|
|
clientMutationId
|
|
|
|
|
chapters {
|
2023-11-24 03:17:49 +01:00
|
|
|
id
|
|
|
|
|
isDownloaded
|
2023-12-25 21:15:41 +01:00
|
|
|
manga {
|
|
|
|
|
id
|
|
|
|
|
downloadCount
|
|
|
|
|
}
|
2023-08-05 01:03:40 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const DELETE_DOWNLOADED_CHAPTERS = gql`
|
|
|
|
|
mutation DELETE_DOWNLOADED_CHAPTERS($input: DeleteDownloadedChaptersInput!) {
|
|
|
|
|
deleteDownloadedChapters(input: $input) {
|
|
|
|
|
clientMutationId
|
|
|
|
|
chapters {
|
2023-11-24 03:17:49 +01:00
|
|
|
id
|
|
|
|
|
isDownloaded
|
2023-12-25 21:15:41 +01:00
|
|
|
manga {
|
|
|
|
|
id
|
|
|
|
|
downloadCount
|
|
|
|
|
}
|
2023-08-05 01:03:40 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const DEQUEUE_CHAPTER_DOWNLOAD = gql`
|
|
|
|
|
${FULL_DOWNLOAD_STATUS}
|
|
|
|
|
mutation DEQUEUE_CHAPTER_DOWNLOAD($input: DequeueChapterDownloadInput!) {
|
|
|
|
|
dequeueChapterDownload(input: $input) {
|
|
|
|
|
clientMutationId
|
|
|
|
|
downloadStatus {
|
|
|
|
|
...FULL_DOWNLOAD_STATUS
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const DEQUEUE_CHAPTER_DOWNLOADS = gql`
|
|
|
|
|
${FULL_DOWNLOAD_STATUS}
|
|
|
|
|
mutation DEQUEUE_CHAPTER_DOWNLOADS($input: DequeueChapterDownloadsInput!) {
|
|
|
|
|
dequeueChapterDownloads(input: $input) {
|
|
|
|
|
clientMutationId
|
|
|
|
|
downloadStatus {
|
|
|
|
|
...FULL_DOWNLOAD_STATUS
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const ENQUEUE_CHAPTER_DOWNLOAD = gql`
|
|
|
|
|
${FULL_DOWNLOAD_STATUS}
|
|
|
|
|
mutation ENQUEUE_CHAPTER_DOWNLOAD($input: EnqueueChapterDownloadInput!) {
|
|
|
|
|
enqueueChapterDownload(input: $input) {
|
|
|
|
|
clientMutationId
|
|
|
|
|
downloadStatus {
|
|
|
|
|
...FULL_DOWNLOAD_STATUS
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const ENQUEUE_CHAPTER_DOWNLOADS = gql`
|
|
|
|
|
${FULL_DOWNLOAD_STATUS}
|
|
|
|
|
mutation ENQUEUE_CHAPTER_DOWNLOADS($input: EnqueueChapterDownloadsInput!) {
|
|
|
|
|
enqueueChapterDownloads(input: $input) {
|
|
|
|
|
clientMutationId
|
|
|
|
|
downloadStatus {
|
|
|
|
|
...FULL_DOWNLOAD_STATUS
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const REORDER_CHAPTER_DOWNLOAD = gql`
|
|
|
|
|
${FULL_DOWNLOAD_STATUS}
|
|
|
|
|
mutation REORDER_CHAPTER_DOWNLOAD($input: ReorderChapterDownloadInput!) {
|
|
|
|
|
reorderChapterDownload(input: $input) {
|
|
|
|
|
clientMutationId
|
|
|
|
|
downloadStatus {
|
|
|
|
|
...FULL_DOWNLOAD_STATUS
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const START_DOWNLOADER = gql`
|
|
|
|
|
mutation START_DOWNLOADER($input: StartDownloaderInput = {}) {
|
|
|
|
|
startDownloader(input: $input) {
|
|
|
|
|
clientMutationId
|
|
|
|
|
downloadStatus {
|
2023-11-24 03:17:49 +01:00
|
|
|
state
|
2023-08-05 01:03:40 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const STOP_DOWNLOADER = gql`
|
|
|
|
|
mutation STOP_DOWNLOADER($input: StopDownloaderInput = {}) {
|
|
|
|
|
stopDownloader(input: $input) {
|
|
|
|
|
clientMutationId
|
|
|
|
|
downloadStatus {
|
2023-11-24 03:17:49 +01:00
|
|
|
state
|
2023-08-05 01:03:40 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`;
|