2024-07-06 15:10:55 +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';
|
2024-07-08 18:02:50 +02:00
|
|
|
import { MANGA_CHAPTER_STAT_FIELDS } from '@/lib/graphql/fragments/MangaFragments.ts';
|
2024-07-06 15:10:55 +02:00
|
|
|
|
|
|
|
|
const UPDATER_MANGA_FIELDS = gql`
|
|
|
|
|
fragment UPDATER_MANGA_FIELDS on MangaType {
|
|
|
|
|
id
|
|
|
|
|
title
|
|
|
|
|
thumbnailUrl
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const UPDATER_SUBSCRIPTION_FIELDS = gql`
|
|
|
|
|
${UPDATER_MANGA_FIELDS}
|
2024-07-08 18:02:50 +02:00
|
|
|
${MANGA_CHAPTER_STAT_FIELDS}
|
2024-07-06 15:10:55 +02:00
|
|
|
|
|
|
|
|
fragment UPDATER_SUBSCRIPTION_FIELDS on UpdateStatus {
|
|
|
|
|
isRunning
|
|
|
|
|
|
|
|
|
|
completeJobs {
|
|
|
|
|
mangas {
|
|
|
|
|
totalCount
|
|
|
|
|
nodes {
|
2024-07-08 18:02:50 +02:00
|
|
|
...MANGA_CHAPTER_STAT_FIELDS
|
2024-07-09 01:16:51 +02:00
|
|
|
|
|
|
|
|
firstUnreadChapter {
|
|
|
|
|
id
|
|
|
|
|
sourceOrder
|
|
|
|
|
}
|
|
|
|
|
lastReadChapter {
|
|
|
|
|
id
|
|
|
|
|
sourceOrder
|
|
|
|
|
lastReadAt
|
|
|
|
|
}
|
|
|
|
|
latestReadChapter {
|
|
|
|
|
id
|
|
|
|
|
sourceOrder
|
|
|
|
|
lastReadAt
|
|
|
|
|
}
|
|
|
|
|
latestFetchedChapter {
|
|
|
|
|
id
|
|
|
|
|
fetchedAt
|
|
|
|
|
}
|
|
|
|
|
latestUploadedChapter {
|
|
|
|
|
id
|
|
|
|
|
uploadDate
|
|
|
|
|
}
|
2024-07-06 15:10:55 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
failedJobs {
|
|
|
|
|
mangas {
|
|
|
|
|
totalCount
|
|
|
|
|
nodes {
|
|
|
|
|
...UPDATER_MANGA_FIELDS
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
pendingJobs {
|
|
|
|
|
mangas {
|
|
|
|
|
totalCount
|
|
|
|
|
nodes {
|
|
|
|
|
...UPDATER_MANGA_FIELDS
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
runningJobs {
|
|
|
|
|
mangas {
|
|
|
|
|
totalCount
|
|
|
|
|
nodes {
|
|
|
|
|
...UPDATER_MANGA_FIELDS
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const UPDATER_START_STOP_FIELDS = gql`
|
|
|
|
|
fragment UPDATER_START_STOP_FIELDS on UpdateStatus {
|
|
|
|
|
isRunning
|
|
|
|
|
}
|
|
|
|
|
`;
|