Update to server gql library update changes

This commit is contained in:
schroda
2025-03-16 21:01:24 +01:00
parent 072c71c116
commit b673047517
13 changed files with 299 additions and 200 deletions

View File

@@ -10,7 +10,7 @@ import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = { const config: CodegenConfig = {
overwrite: true, overwrite: true,
schema: 'http://localhost:45670/api/graphql', schema: 'http://localhost:4567/api/graphql',
documents: [ documents: [
'src/lib/graphql/queries/**', 'src/lib/graphql/queries/**',
'src/lib/graphql/mutations/**', 'src/lib/graphql/mutations/**',

View File

@@ -7,77 +7,76 @@
*/ */
import gql from 'graphql-tag'; import gql from 'graphql-tag';
import { MANGA_CHAPTER_STAT_FIELDS } from '@/lib/graphql/fragments/MangaFragments.ts';
const UPDATER_MANGA_FIELDS = gql` const UPDATER_MANGA_FIELDS = gql`
fragment UPDATER_MANGA_FIELDS on MangaType { fragment UPDATER_MANGA_FIELDS on MangaUpdateType {
id status
title manga {
thumbnailUrl id
title
thumbnailUrl
}
}
`;
const UPDATER_CATEGORY_FIELDS = gql`
fragment UPDATER_CATEGORY_FIELDS on CategoryUpdateType {
status
category {
id
name
}
}
`;
const UPDATER_JOB_INFO_FIELDS = gql`
fragment UPDATER_JOB_INFO_FIELDS on UpdaterJobsInfoType {
isRunning
totalJobs
finishedJobs
skippedCategoriesCount
skippedMangasCount
}
`;
export const UPDATER_STATUS_FIELDS = gql`
${UPDATER_JOB_INFO_FIELDS}
${UPDATER_CATEGORY_FIELDS}
${UPDATER_MANGA_FIELDS}
fragment UPDATER_STATUS_FIELDS on LibraryUpdateStatus {
jobsInfo {
...UPDATER_JOB_INFO_FIELDS
}
categoryUpdates {
...UPDATER_CATEGORY_FIELDS
}
mangaUpdates {
...UPDATER_MANGA_FIELDS
}
} }
`; `;
export const UPDATER_SUBSCRIPTION_FIELDS = gql` export const UPDATER_SUBSCRIPTION_FIELDS = gql`
${UPDATER_JOB_INFO_FIELDS}
${UPDATER_CATEGORY_FIELDS}
${UPDATER_MANGA_FIELDS} ${UPDATER_MANGA_FIELDS}
${MANGA_CHAPTER_STAT_FIELDS}
fragment UPDATER_SUBSCRIPTION_FIELDS on UpdateStatus { fragment UPDATER_SUBSCRIPTION_FIELDS on UpdaterUpdates {
isRunning omittedUpdates
completeJobs { jobsInfo {
mangas { ...UPDATER_JOB_INFO_FIELDS
totalCount }
nodes {
...MANGA_CHAPTER_STAT_FIELDS
firstUnreadChapter { categoryUpdates {
id ...UPDATER_CATEGORY_FIELDS
sourceOrder
}
lastReadChapter {
id
sourceOrder
lastReadAt
}
latestReadChapter {
id
sourceOrder
lastReadAt
}
latestFetchedChapter {
id
fetchedAt
}
latestUploadedChapter {
id
uploadDate
}
}
}
} }
failedJobs {
mangas { mangaUpdates {
totalCount ...UPDATER_MANGA_FIELDS
nodes {
...UPDATER_MANGA_FIELDS
}
}
}
pendingJobs {
mangas {
totalCount
nodes {
...UPDATER_MANGA_FIELDS
}
}
}
runningJobs {
mangas {
totalCount
nodes {
...UPDATER_MANGA_FIELDS
}
}
} }
} }
`; `;

View File

@@ -60,6 +60,11 @@ export type CategoryTypeFieldPolicy = {
name?: FieldPolicy<any> | FieldReadFunction<any>, name?: FieldPolicy<any> | FieldReadFunction<any>,
order?: FieldPolicy<any> | FieldReadFunction<any> order?: FieldPolicy<any> | FieldReadFunction<any>
}; };
export type CategoryUpdateTypeKeySpecifier = ('category' | 'status' | CategoryUpdateTypeKeySpecifier)[];
export type CategoryUpdateTypeFieldPolicy = {
category?: FieldPolicy<any> | FieldReadFunction<any>,
status?: FieldPolicy<any> | FieldReadFunction<any>
};
export type ChapterEdgeKeySpecifier = ('cursor' | 'node' | ChapterEdgeKeySpecifier)[]; export type ChapterEdgeKeySpecifier = ('cursor' | 'node' | ChapterEdgeKeySpecifier)[];
export type ChapterEdgeFieldPolicy = { export type ChapterEdgeFieldPolicy = {
cursor?: FieldPolicy<any> | FieldReadFunction<any>, cursor?: FieldPolicy<any> | FieldReadFunction<any>,
@@ -352,6 +357,12 @@ export type LastUpdateTimestampPayloadKeySpecifier = ('timestamp' | LastUpdateTi
export type LastUpdateTimestampPayloadFieldPolicy = { export type LastUpdateTimestampPayloadFieldPolicy = {
timestamp?: FieldPolicy<any> | FieldReadFunction<any> timestamp?: FieldPolicy<any> | FieldReadFunction<any>
}; };
export type LibraryUpdateStatusKeySpecifier = ('categoryUpdates' | 'jobsInfo' | 'mangaUpdates' | LibraryUpdateStatusKeySpecifier)[];
export type LibraryUpdateStatusFieldPolicy = {
categoryUpdates?: FieldPolicy<any> | FieldReadFunction<any>,
jobsInfo?: FieldPolicy<any> | FieldReadFunction<any>,
mangaUpdates?: FieldPolicy<any> | FieldReadFunction<any>
};
export type ListPreferenceKeySpecifier = ('currentValue' | 'default' | 'entries' | 'entryValues' | 'key' | 'summary' | 'title' | 'visible' | ListPreferenceKeySpecifier)[]; export type ListPreferenceKeySpecifier = ('currentValue' | 'default' | 'entries' | 'entryValues' | 'key' | 'summary' | 'title' | 'visible' | ListPreferenceKeySpecifier)[];
export type ListPreferenceFieldPolicy = { export type ListPreferenceFieldPolicy = {
currentValue?: FieldPolicy<any> | FieldReadFunction<any>, currentValue?: FieldPolicy<any> | FieldReadFunction<any>,
@@ -437,6 +448,11 @@ export type MangaTypeFieldPolicy = {
updateStrategy?: FieldPolicy<any> | FieldReadFunction<any>, updateStrategy?: FieldPolicy<any> | FieldReadFunction<any>,
url?: FieldPolicy<any> | FieldReadFunction<any> url?: FieldPolicy<any> | FieldReadFunction<any>
}; };
export type MangaUpdateTypeKeySpecifier = ('manga' | 'status' | MangaUpdateTypeKeySpecifier)[];
export type MangaUpdateTypeFieldPolicy = {
manga?: FieldPolicy<any> | FieldReadFunction<any>,
status?: FieldPolicy<any> | FieldReadFunction<any>
};
export type MetaEdgeKeySpecifier = ('cursor' | 'node' | MetaEdgeKeySpecifier)[]; export type MetaEdgeKeySpecifier = ('cursor' | 'node' | MetaEdgeKeySpecifier)[];
export type MetaEdgeFieldPolicy = { export type MetaEdgeFieldPolicy = {
cursor?: FieldPolicy<any> | FieldReadFunction<any>, cursor?: FieldPolicy<any> | FieldReadFunction<any>,
@@ -460,7 +476,7 @@ export type MultiSelectListPreferenceFieldPolicy = {
title?: FieldPolicy<any> | FieldReadFunction<any>, title?: FieldPolicy<any> | FieldReadFunction<any>,
visible?: FieldPolicy<any> | FieldReadFunction<any> visible?: FieldPolicy<any> | FieldReadFunction<any>
}; };
export type MutationKeySpecifier = ('bindTrack' | 'clearCachedImages' | 'clearDownloader' | 'createBackup' | 'createCategory' | 'deleteCategory' | 'deleteCategoryMeta' | 'deleteChapterMeta' | 'deleteDownloadedChapter' | 'deleteDownloadedChapters' | 'deleteGlobalMeta' | 'deleteMangaMeta' | 'deleteSourceMeta' | 'dequeueChapterDownload' | 'dequeueChapterDownloads' | 'enqueueChapterDownload' | 'enqueueChapterDownloads' | 'fetchChapterPages' | 'fetchChapters' | 'fetchExtensions' | 'fetchManga' | 'fetchSourceManga' | 'fetchTrack' | 'installExternalExtension' | 'loginTrackerCredentials' | 'loginTrackerOAuth' | 'logoutTracker' | 'reorderChapterDownload' | 'resetSettings' | 'resetWebUIUpdateStatus' | 'restoreBackup' | 'setCategoryMeta' | 'setChapterMeta' | 'setGlobalMeta' | 'setMangaMeta' | 'setSettings' | 'setSourceMeta' | 'startDownloader' | 'stopDownloader' | 'trackProgress' | 'unbindTrack' | 'updateCategories' | 'updateCategory' | 'updateCategoryManga' | 'updateCategoryOrder' | 'updateChapter' | 'updateChapters' | 'updateExtension' | 'updateExtensions' | 'updateLibraryManga' | 'updateManga' | 'updateMangaCategories' | 'updateMangas' | 'updateMangasCategories' | 'updateSourcePreference' | 'updateStop' | 'updateTrack' | 'updateWebUI' | MutationKeySpecifier)[]; export type MutationKeySpecifier = ('bindTrack' | 'clearCachedImages' | 'clearDownloader' | 'createBackup' | 'createCategory' | 'deleteCategory' | 'deleteCategoryMeta' | 'deleteChapterMeta' | 'deleteDownloadedChapter' | 'deleteDownloadedChapters' | 'deleteGlobalMeta' | 'deleteMangaMeta' | 'deleteSourceMeta' | 'dequeueChapterDownload' | 'dequeueChapterDownloads' | 'enqueueChapterDownload' | 'enqueueChapterDownloads' | 'fetchChapterPages' | 'fetchChapters' | 'fetchExtensions' | 'fetchManga' | 'fetchSourceManga' | 'fetchTrack' | 'installExternalExtension' | 'loginTrackerCredentials' | 'loginTrackerOAuth' | 'logoutTracker' | 'reorderChapterDownload' | 'resetSettings' | 'resetWebUIUpdateStatus' | 'restoreBackup' | 'setCategoryMeta' | 'setChapterMeta' | 'setGlobalMeta' | 'setMangaMeta' | 'setSettings' | 'setSourceMeta' | 'startDownloader' | 'stopDownloader' | 'trackProgress' | 'unbindTrack' | 'updateCategories' | 'updateCategory' | 'updateCategoryManga' | 'updateCategoryOrder' | 'updateChapter' | 'updateChapters' | 'updateExtension' | 'updateExtensions' | 'updateLibrary' | 'updateLibraryManga' | 'updateManga' | 'updateMangaCategories' | 'updateMangas' | 'updateMangasCategories' | 'updateSourcePreference' | 'updateStop' | 'updateTrack' | 'updateWebUI' | MutationKeySpecifier)[];
export type MutationFieldPolicy = { export type MutationFieldPolicy = {
bindTrack?: FieldPolicy<any> | FieldReadFunction<any>, bindTrack?: FieldPolicy<any> | FieldReadFunction<any>,
clearCachedImages?: FieldPolicy<any> | FieldReadFunction<any>, clearCachedImages?: FieldPolicy<any> | FieldReadFunction<any>,
@@ -511,6 +527,7 @@ export type MutationFieldPolicy = {
updateChapters?: FieldPolicy<any> | FieldReadFunction<any>, updateChapters?: FieldPolicy<any> | FieldReadFunction<any>,
updateExtension?: FieldPolicy<any> | FieldReadFunction<any>, updateExtension?: FieldPolicy<any> | FieldReadFunction<any>,
updateExtensions?: FieldPolicy<any> | FieldReadFunction<any>, updateExtensions?: FieldPolicy<any> | FieldReadFunction<any>,
updateLibrary?: FieldPolicy<any> | FieldReadFunction<any>,
updateLibraryManga?: FieldPolicy<any> | FieldReadFunction<any>, updateLibraryManga?: FieldPolicy<any> | FieldReadFunction<any>,
updateManga?: FieldPolicy<any> | FieldReadFunction<any>, updateManga?: FieldPolicy<any> | FieldReadFunction<any>,
updateMangaCategories?: FieldPolicy<any> | FieldReadFunction<any>, updateMangaCategories?: FieldPolicy<any> | FieldReadFunction<any>,
@@ -586,7 +603,7 @@ export type PartialSettingsTypeFieldPolicy = {
webUIInterface?: FieldPolicy<any> | FieldReadFunction<any>, webUIInterface?: FieldPolicy<any> | FieldReadFunction<any>,
webUIUpdateCheckInterval?: FieldPolicy<any> | FieldReadFunction<any> webUIUpdateCheckInterval?: FieldPolicy<any> | FieldReadFunction<any>
}; };
export type QueryKeySpecifier = ('aboutServer' | 'aboutWebUI' | 'categories' | 'category' | 'chapter' | 'chapters' | 'checkForServerUpdates' | 'checkForWebUIUpdate' | 'downloadStatus' | 'extension' | 'extensions' | 'getWebUIUpdateStatus' | 'lastUpdateTimestamp' | 'manga' | 'mangas' | 'meta' | 'metas' | 'restoreStatus' | 'searchTracker' | 'settings' | 'source' | 'sources' | 'trackRecord' | 'trackRecords' | 'tracker' | 'trackers' | 'updateStatus' | 'validateBackup' | QueryKeySpecifier)[]; export type QueryKeySpecifier = ('aboutServer' | 'aboutWebUI' | 'categories' | 'category' | 'chapter' | 'chapters' | 'checkForServerUpdates' | 'checkForWebUIUpdate' | 'downloadStatus' | 'extension' | 'extensions' | 'getWebUIUpdateStatus' | 'lastUpdateTimestamp' | 'libraryUpdateStatus' | 'manga' | 'mangas' | 'meta' | 'metas' | 'restoreStatus' | 'searchTracker' | 'settings' | 'source' | 'sources' | 'trackRecord' | 'trackRecords' | 'tracker' | 'trackers' | 'updateStatus' | 'validateBackup' | QueryKeySpecifier)[];
export type QueryFieldPolicy = { export type QueryFieldPolicy = {
aboutServer?: FieldPolicy<any> | FieldReadFunction<any>, aboutServer?: FieldPolicy<any> | FieldReadFunction<any>,
aboutWebUI?: FieldPolicy<any> | FieldReadFunction<any>, aboutWebUI?: FieldPolicy<any> | FieldReadFunction<any>,
@@ -601,6 +618,7 @@ export type QueryFieldPolicy = {
extensions?: FieldPolicy<any> | FieldReadFunction<any>, extensions?: FieldPolicy<any> | FieldReadFunction<any>,
getWebUIUpdateStatus?: FieldPolicy<Reference, Reference, Reference, FieldFunctionOptions<GetWebuiUpdateStatusQueryVariables>> | FieldReadFunction<Reference, Reference, FieldFunctionOptions<GetWebuiUpdateStatusQueryVariables>>, getWebUIUpdateStatus?: FieldPolicy<Reference, Reference, Reference, FieldFunctionOptions<GetWebuiUpdateStatusQueryVariables>> | FieldReadFunction<Reference, Reference, FieldFunctionOptions<GetWebuiUpdateStatusQueryVariables>>,
lastUpdateTimestamp?: FieldPolicy<any> | FieldReadFunction<any>, lastUpdateTimestamp?: FieldPolicy<any> | FieldReadFunction<any>,
libraryUpdateStatus?: FieldPolicy<Reference, Reference, Reference, FieldFunctionOptions<GetUpdateStatusQueryVariables>> | FieldReadFunction<Reference, Reference, FieldFunctionOptions<GetUpdateStatusQueryVariables>>,
manga?: FieldPolicy<Reference, Reference, Reference, FieldFunctionOptions<GetMangaScreenQueryVariables>> | FieldReadFunction<Reference, Reference, FieldFunctionOptions<GetMangaScreenQueryVariables>>, manga?: FieldPolicy<Reference, Reference, Reference, FieldFunctionOptions<GetMangaScreenQueryVariables>> | FieldReadFunction<Reference, Reference, FieldFunctionOptions<GetMangaScreenQueryVariables>>,
mangas?: FieldPolicy<any> | FieldReadFunction<any>, mangas?: FieldPolicy<any> | FieldReadFunction<any>,
meta?: FieldPolicy<Reference, Reference, Reference, FieldFunctionOptions<GetGlobalMetadataQueryVariables>> | FieldReadFunction<Reference, Reference, FieldFunctionOptions<GetGlobalMetadataQueryVariables>>, meta?: FieldPolicy<Reference, Reference, Reference, FieldFunctionOptions<GetGlobalMetadataQueryVariables>> | FieldReadFunction<Reference, Reference, FieldFunctionOptions<GetGlobalMetadataQueryVariables>>,
@@ -614,7 +632,7 @@ export type QueryFieldPolicy = {
trackRecords?: FieldPolicy<any> | FieldReadFunction<any>, trackRecords?: FieldPolicy<any> | FieldReadFunction<any>,
tracker?: FieldPolicy<any> | FieldReadFunction<any>, tracker?: FieldPolicy<any> | FieldReadFunction<any>,
trackers?: FieldPolicy<any> | FieldReadFunction<any>, trackers?: FieldPolicy<any> | FieldReadFunction<any>,
updateStatus?: FieldPolicy<Reference, Reference, Reference, FieldFunctionOptions<GetUpdateStatusQueryVariables>> | FieldReadFunction<Reference, Reference, FieldFunctionOptions<GetUpdateStatusQueryVariables>>, updateStatus?: FieldPolicy<any> | FieldReadFunction<any>,
validateBackup?: FieldPolicy<any> | FieldReadFunction<any> validateBackup?: FieldPolicy<any> | FieldReadFunction<any>
}; };
export type ReorderChapterDownloadPayloadKeySpecifier = ('clientMutationId' | 'downloadStatus' | ReorderChapterDownloadPayloadKeySpecifier)[]; export type ReorderChapterDownloadPayloadKeySpecifier = ('clientMutationId' | 'downloadStatus' | ReorderChapterDownloadPayloadKeySpecifier)[];
@@ -835,10 +853,11 @@ export type StopDownloaderPayloadFieldPolicy = {
clientMutationId?: FieldPolicy<any> | FieldReadFunction<any>, clientMutationId?: FieldPolicy<any> | FieldReadFunction<any>,
downloadStatus?: FieldPolicy<any> | FieldReadFunction<any> downloadStatus?: FieldPolicy<any> | FieldReadFunction<any>
}; };
export type SubscriptionKeySpecifier = ('downloadChanged' | 'downloadStatusChanged' | 'updateStatusChanged' | 'webUIUpdateStatusChange' | SubscriptionKeySpecifier)[]; export type SubscriptionKeySpecifier = ('downloadChanged' | 'downloadStatusChanged' | 'libraryUpdateStatusChanged' | 'updateStatusChanged' | 'webUIUpdateStatusChange' | SubscriptionKeySpecifier)[];
export type SubscriptionFieldPolicy = { export type SubscriptionFieldPolicy = {
downloadChanged?: FieldPolicy<any> | FieldReadFunction<any>, downloadChanged?: FieldPolicy<any> | FieldReadFunction<any>,
downloadStatusChanged?: FieldPolicy<any> | FieldReadFunction<any>, downloadStatusChanged?: FieldPolicy<any> | FieldReadFunction<any>,
libraryUpdateStatusChanged?: FieldPolicy<any> | FieldReadFunction<any>,
updateStatusChanged?: FieldPolicy<any> | FieldReadFunction<any>, updateStatusChanged?: FieldPolicy<any> | FieldReadFunction<any>,
webUIUpdateStatusChange?: FieldPolicy<any> | FieldReadFunction<any> webUIUpdateStatusChange?: FieldPolicy<any> | FieldReadFunction<any>
}; };
@@ -992,6 +1011,11 @@ export type UpdateLibraryMangaPayloadFieldPolicy = {
clientMutationId?: FieldPolicy<any> | FieldReadFunction<any>, clientMutationId?: FieldPolicy<any> | FieldReadFunction<any>,
updateStatus?: FieldPolicy<any> | FieldReadFunction<any> updateStatus?: FieldPolicy<any> | FieldReadFunction<any>
}; };
export type UpdateLibraryPayloadKeySpecifier = ('clientMutationId' | 'updateStatus' | UpdateLibraryPayloadKeySpecifier)[];
export type UpdateLibraryPayloadFieldPolicy = {
clientMutationId?: FieldPolicy<any> | FieldReadFunction<any>,
updateStatus?: FieldPolicy<any> | FieldReadFunction<any>
};
export type UpdateMangaCategoriesPayloadKeySpecifier = ('clientMutationId' | 'manga' | UpdateMangaCategoriesPayloadKeySpecifier)[]; export type UpdateMangaCategoriesPayloadKeySpecifier = ('clientMutationId' | 'manga' | UpdateMangaCategoriesPayloadKeySpecifier)[];
export type UpdateMangaCategoriesPayloadFieldPolicy = { export type UpdateMangaCategoriesPayloadFieldPolicy = {
clientMutationId?: FieldPolicy<any> | FieldReadFunction<any>, clientMutationId?: FieldPolicy<any> | FieldReadFunction<any>,
@@ -1046,6 +1070,22 @@ export type UpdateTrackPayloadFieldPolicy = {
clientMutationId?: FieldPolicy<any> | FieldReadFunction<any>, clientMutationId?: FieldPolicy<any> | FieldReadFunction<any>,
trackRecord?: FieldPolicy<any> | FieldReadFunction<any> trackRecord?: FieldPolicy<any> | FieldReadFunction<any>
}; };
export type UpdaterJobsInfoTypeKeySpecifier = ('finishedJobs' | 'isRunning' | 'skippedCategoriesCount' | 'skippedMangasCount' | 'totalJobs' | UpdaterJobsInfoTypeKeySpecifier)[];
export type UpdaterJobsInfoTypeFieldPolicy = {
finishedJobs?: FieldPolicy<any> | FieldReadFunction<any>,
isRunning?: FieldPolicy<any> | FieldReadFunction<any>,
skippedCategoriesCount?: FieldPolicy<any> | FieldReadFunction<any>,
skippedMangasCount?: FieldPolicy<any> | FieldReadFunction<any>,
totalJobs?: FieldPolicy<any> | FieldReadFunction<any>
};
export type UpdaterUpdatesKeySpecifier = ('categoryUpdates' | 'initial' | 'jobsInfo' | 'mangaUpdates' | 'omittedUpdates' | UpdaterUpdatesKeySpecifier)[];
export type UpdaterUpdatesFieldPolicy = {
categoryUpdates?: FieldPolicy<any> | FieldReadFunction<any>,
initial?: FieldPolicy<any> | FieldReadFunction<any>,
jobsInfo?: FieldPolicy<any> | FieldReadFunction<any>,
mangaUpdates?: FieldPolicy<any> | FieldReadFunction<any>,
omittedUpdates?: FieldPolicy<any> | FieldReadFunction<any>
};
export type ValidateBackupResultKeySpecifier = ('missingSources' | 'missingTrackers' | ValidateBackupResultKeySpecifier)[]; export type ValidateBackupResultKeySpecifier = ('missingSources' | 'missingTrackers' | ValidateBackupResultKeySpecifier)[];
export type ValidateBackupResultFieldPolicy = { export type ValidateBackupResultFieldPolicy = {
missingSources?: FieldPolicy<any> | FieldReadFunction<any>, missingSources?: FieldPolicy<any> | FieldReadFunction<any>,
@@ -1115,6 +1155,10 @@ export type StrictTypedTypePolicies = {
keyFields?: false | CategoryTypeKeySpecifier | (() => undefined | CategoryTypeKeySpecifier), keyFields?: false | CategoryTypeKeySpecifier | (() => undefined | CategoryTypeKeySpecifier),
fields?: CategoryTypeFieldPolicy, fields?: CategoryTypeFieldPolicy,
}, },
CategoryUpdateType?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | CategoryUpdateTypeKeySpecifier | (() => undefined | CategoryUpdateTypeKeySpecifier),
fields?: CategoryUpdateTypeFieldPolicy,
},
ChapterEdge?: Omit<TypePolicy, "fields" | "keyFields"> & { ChapterEdge?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | ChapterEdgeKeySpecifier | (() => undefined | ChapterEdgeKeySpecifier), keyFields?: false | ChapterEdgeKeySpecifier | (() => undefined | ChapterEdgeKeySpecifier),
fields?: ChapterEdgeFieldPolicy, fields?: ChapterEdgeFieldPolicy,
@@ -1299,6 +1343,10 @@ export type StrictTypedTypePolicies = {
keyFields?: false | LastUpdateTimestampPayloadKeySpecifier | (() => undefined | LastUpdateTimestampPayloadKeySpecifier), keyFields?: false | LastUpdateTimestampPayloadKeySpecifier | (() => undefined | LastUpdateTimestampPayloadKeySpecifier),
fields?: LastUpdateTimestampPayloadFieldPolicy, fields?: LastUpdateTimestampPayloadFieldPolicy,
}, },
LibraryUpdateStatus?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | LibraryUpdateStatusKeySpecifier | (() => undefined | LibraryUpdateStatusKeySpecifier),
fields?: LibraryUpdateStatusFieldPolicy,
},
ListPreference?: Omit<TypePolicy, "fields" | "keyFields"> & { ListPreference?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | ListPreferenceKeySpecifier | (() => undefined | ListPreferenceKeySpecifier), keyFields?: false | ListPreferenceKeySpecifier | (() => undefined | ListPreferenceKeySpecifier),
fields?: ListPreferenceFieldPolicy, fields?: ListPreferenceFieldPolicy,
@@ -1331,6 +1379,10 @@ export type StrictTypedTypePolicies = {
keyFields?: false | MangaTypeKeySpecifier | (() => undefined | MangaTypeKeySpecifier), keyFields?: false | MangaTypeKeySpecifier | (() => undefined | MangaTypeKeySpecifier),
fields?: MangaTypeFieldPolicy, fields?: MangaTypeFieldPolicy,
}, },
MangaUpdateType?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | MangaUpdateTypeKeySpecifier | (() => undefined | MangaUpdateTypeKeySpecifier),
fields?: MangaUpdateTypeFieldPolicy,
},
MetaEdge?: Omit<TypePolicy, "fields" | "keyFields"> & { MetaEdge?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | MetaEdgeKeySpecifier | (() => undefined | MetaEdgeKeySpecifier), keyFields?: false | MetaEdgeKeySpecifier | (() => undefined | MetaEdgeKeySpecifier),
fields?: MetaEdgeFieldPolicy, fields?: MetaEdgeFieldPolicy,
@@ -1543,6 +1595,10 @@ export type StrictTypedTypePolicies = {
keyFields?: false | UpdateLibraryMangaPayloadKeySpecifier | (() => undefined | UpdateLibraryMangaPayloadKeySpecifier), keyFields?: false | UpdateLibraryMangaPayloadKeySpecifier | (() => undefined | UpdateLibraryMangaPayloadKeySpecifier),
fields?: UpdateLibraryMangaPayloadFieldPolicy, fields?: UpdateLibraryMangaPayloadFieldPolicy,
}, },
UpdateLibraryPayload?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | UpdateLibraryPayloadKeySpecifier | (() => undefined | UpdateLibraryPayloadKeySpecifier),
fields?: UpdateLibraryPayloadFieldPolicy,
},
UpdateMangaCategoriesPayload?: Omit<TypePolicy, "fields" | "keyFields"> & { UpdateMangaCategoriesPayload?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | UpdateMangaCategoriesPayloadKeySpecifier | (() => undefined | UpdateMangaCategoriesPayloadKeySpecifier), keyFields?: false | UpdateMangaCategoriesPayloadKeySpecifier | (() => undefined | UpdateMangaCategoriesPayloadKeySpecifier),
fields?: UpdateMangaCategoriesPayloadFieldPolicy, fields?: UpdateMangaCategoriesPayloadFieldPolicy,
@@ -1583,6 +1639,14 @@ export type StrictTypedTypePolicies = {
keyFields?: false | UpdateTrackPayloadKeySpecifier | (() => undefined | UpdateTrackPayloadKeySpecifier), keyFields?: false | UpdateTrackPayloadKeySpecifier | (() => undefined | UpdateTrackPayloadKeySpecifier),
fields?: UpdateTrackPayloadFieldPolicy, fields?: UpdateTrackPayloadFieldPolicy,
}, },
UpdaterJobsInfoType?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | UpdaterJobsInfoTypeKeySpecifier | (() => undefined | UpdaterJobsInfoTypeKeySpecifier),
fields?: UpdaterJobsInfoTypeFieldPolicy,
},
UpdaterUpdates?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | UpdaterUpdatesKeySpecifier | (() => undefined | UpdaterUpdatesKeySpecifier),
fields?: UpdaterUpdatesFieldPolicy,
},
ValidateBackupResult?: Omit<TypePolicy, "fields" | "keyFields"> & { ValidateBackupResult?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | ValidateBackupResultKeySpecifier | (() => undefined | ValidateBackupResultKeySpecifier), keyFields?: false | ValidateBackupResultKeySpecifier | (() => undefined | ValidateBackupResultKeySpecifier),
fields?: ValidateBackupResultFieldPolicy, fields?: ValidateBackupResultFieldPolicy,

View File

@@ -103,6 +103,11 @@ export type CategoryFilterInput = {
order?: InputMaybe<IntFilterInput>; order?: InputMaybe<IntFilterInput>;
}; };
export enum CategoryJobStatus {
Skipped = 'SKIPPED',
Updating = 'UPDATING'
}
export type CategoryMetaType = MetaType & { export type CategoryMetaType = MetaType & {
__typename?: 'CategoryMetaType'; __typename?: 'CategoryMetaType';
category: CategoryType; category: CategoryType;
@@ -148,6 +153,12 @@ export type CategoryType = {
order: Scalars['Int']['output']; order: Scalars['Int']['output'];
}; };
export type CategoryUpdateType = {
__typename?: 'CategoryUpdateType';
category: CategoryType;
status: CategoryJobStatus;
};
export type ChapterConditionInput = { export type ChapterConditionInput = {
chapterNumber?: InputMaybe<Scalars['Float']['input']>; chapterNumber?: InputMaybe<Scalars['Float']['input']>;
fetchedAt?: InputMaybe<Scalars['LongString']['input']>; fetchedAt?: InputMaybe<Scalars['LongString']['input']>;
@@ -267,7 +278,7 @@ export type CheckBoxPreference = {
default: Scalars['Boolean']['output']; default: Scalars['Boolean']['output'];
key: Scalars['String']['output']; key: Scalars['String']['output'];
summary?: Maybe<Scalars['String']['output']>; summary?: Maybe<Scalars['String']['output']>;
title: Scalars['String']['output']; title?: Maybe<Scalars['String']['output']>;
visible: Scalars['Boolean']['output']; visible: Scalars['Boolean']['output'];
}; };
@@ -835,6 +846,18 @@ export type LastUpdateTimestampPayload = {
timestamp: Scalars['LongString']['output']; timestamp: Scalars['LongString']['output'];
}; };
export type LibraryUpdateStatus = {
__typename?: 'LibraryUpdateStatus';
categoryUpdates: Array<CategoryUpdateType>;
jobsInfo: UpdaterJobsInfoType;
mangaUpdates: Array<MangaUpdateType>;
};
export type LibraryUpdateStatusChangedInput = {
/** Sets a max number of updates that can be contained in a updater update message.Everything above this limit will be omitted and the "updateStatus" should be re-fetched via the corresponding query. Due to the graphql subscription execution strategy not supporting batching for data loaders, the data loaders run into the n+1 problem, which can cause the server to get unresponsive until the status update has been handled. This is an issue e.g. when starting an update. */
maxUpdates?: InputMaybe<Scalars['Int']['input']>;
};
export type ListPreference = { export type ListPreference = {
__typename?: 'ListPreference'; __typename?: 'ListPreference';
currentValue?: Maybe<Scalars['String']['output']>; currentValue?: Maybe<Scalars['String']['output']>;
@@ -953,6 +976,14 @@ export type MangaFilterInput = {
url?: InputMaybe<StringFilterInput>; url?: InputMaybe<StringFilterInput>;
}; };
export enum MangaJobStatus {
Complete = 'COMPLETE',
Failed = 'FAILED',
Pending = 'PENDING',
Running = 'RUNNING',
Skipped = 'SKIPPED'
}
export type MangaMetaType = MetaType & { export type MangaMetaType = MetaType & {
__typename?: 'MangaMetaType'; __typename?: 'MangaMetaType';
key: Scalars['String']['output']; key: Scalars['String']['output'];
@@ -1053,6 +1084,12 @@ export type MangaType = {
url: Scalars['String']['output']; url: Scalars['String']['output'];
}; };
export type MangaUpdateType = {
__typename?: 'MangaUpdateType';
manga: MangaType;
status: MangaJobStatus;
};
export type MetaConditionInput = { export type MetaConditionInput = {
key?: InputMaybe<Scalars['String']['input']>; key?: InputMaybe<Scalars['String']['input']>;
value?: InputMaybe<Scalars['String']['input']>; value?: InputMaybe<Scalars['String']['input']>;
@@ -1152,6 +1189,7 @@ export type Mutation = {
updateChapters?: Maybe<UpdateChaptersPayload>; updateChapters?: Maybe<UpdateChaptersPayload>;
updateExtension?: Maybe<UpdateExtensionPayload>; updateExtension?: Maybe<UpdateExtensionPayload>;
updateExtensions?: Maybe<UpdateExtensionsPayload>; updateExtensions?: Maybe<UpdateExtensionsPayload>;
updateLibrary?: Maybe<UpdateLibraryPayload>;
updateLibraryManga?: Maybe<UpdateLibraryMangaPayload>; updateLibraryManga?: Maybe<UpdateLibraryMangaPayload>;
updateManga?: Maybe<UpdateMangaPayload>; updateManga?: Maybe<UpdateMangaPayload>;
updateMangaCategories?: Maybe<UpdateMangaCategoriesPayload>; updateMangaCategories?: Maybe<UpdateMangaCategoriesPayload>;
@@ -1404,6 +1442,11 @@ export type MutationUpdateExtensionsArgs = {
}; };
export type MutationUpdateLibraryArgs = {
input: UpdateLibraryInput;
};
export type MutationUpdateLibraryMangaArgs = { export type MutationUpdateLibraryMangaArgs = {
input: UpdateLibraryMangaInput; input: UpdateLibraryMangaInput;
}; };
@@ -1593,6 +1636,7 @@ export type Query = {
extensions: ExtensionNodeList; extensions: ExtensionNodeList;
getWebUIUpdateStatus: WebUiUpdateStatus; getWebUIUpdateStatus: WebUiUpdateStatus;
lastUpdateTimestamp: LastUpdateTimestampPayload; lastUpdateTimestamp: LastUpdateTimestampPayload;
libraryUpdateStatus: LibraryUpdateStatus;
manga: MangaType; manga: MangaType;
mangas: MangaNodeList; mangas: MangaNodeList;
meta: GlobalMetaType; meta: GlobalMetaType;
@@ -1606,6 +1650,7 @@ export type Query = {
trackRecords: TrackRecordNodeList; trackRecords: TrackRecordNodeList;
tracker: TrackerType; tracker: TrackerType;
trackers: TrackerNodeList; trackers: TrackerNodeList;
/** @deprecated Replaced with libraryUpdateStatus, replace with libraryUpdateStatus */
updateStatus: UpdateStatus; updateStatus: UpdateStatus;
validateBackup: ValidateBackupResult; validateBackup: ValidateBackupResult;
}; };
@@ -1620,8 +1665,6 @@ export type QueryCategoriesArgs = {
last?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>; offset?: InputMaybe<Scalars['Int']['input']>;
order?: InputMaybe<Array<CategoryOrderInput>>; order?: InputMaybe<Array<CategoryOrderInput>>;
orderBy?: InputMaybe<CategoryOrderBy>;
orderByType?: InputMaybe<SortOrder>;
}; };
@@ -1644,8 +1687,6 @@ export type QueryChaptersArgs = {
last?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>; offset?: InputMaybe<Scalars['Int']['input']>;
order?: InputMaybe<Array<ChapterOrderInput>>; order?: InputMaybe<Array<ChapterOrderInput>>;
orderBy?: InputMaybe<ChapterOrderBy>;
orderByType?: InputMaybe<SortOrder>;
}; };
@@ -1663,8 +1704,6 @@ export type QueryExtensionsArgs = {
last?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>; offset?: InputMaybe<Scalars['Int']['input']>;
order?: InputMaybe<Array<ExtensionOrderInput>>; order?: InputMaybe<Array<ExtensionOrderInput>>;
orderBy?: InputMaybe<ExtensionOrderBy>;
orderByType?: InputMaybe<SortOrder>;
}; };
@@ -1682,8 +1721,6 @@ export type QueryMangasArgs = {
last?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>; offset?: InputMaybe<Scalars['Int']['input']>;
order?: InputMaybe<Array<MangaOrderInput>>; order?: InputMaybe<Array<MangaOrderInput>>;
orderBy?: InputMaybe<MangaOrderBy>;
orderByType?: InputMaybe<SortOrder>;
}; };
@@ -1701,8 +1738,6 @@ export type QueryMetasArgs = {
last?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>; offset?: InputMaybe<Scalars['Int']['input']>;
order?: InputMaybe<Array<MetaOrderInput>>; order?: InputMaybe<Array<MetaOrderInput>>;
orderBy?: InputMaybe<MetaOrderBy>;
orderByType?: InputMaybe<SortOrder>;
}; };
@@ -1730,8 +1765,6 @@ export type QuerySourcesArgs = {
last?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>; offset?: InputMaybe<Scalars['Int']['input']>;
order?: InputMaybe<Array<SourceOrderInput>>; order?: InputMaybe<Array<SourceOrderInput>>;
orderBy?: InputMaybe<SourceOrderBy>;
orderByType?: InputMaybe<SortOrder>;
}; };
@@ -1749,8 +1782,6 @@ export type QueryTrackRecordsArgs = {
last?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>; offset?: InputMaybe<Scalars['Int']['input']>;
order?: InputMaybe<Array<TrackRecordOrderInput>>; order?: InputMaybe<Array<TrackRecordOrderInput>>;
orderBy?: InputMaybe<TrackRecordOrderBy>;
orderByType?: InputMaybe<SortOrder>;
}; };
@@ -1767,8 +1798,6 @@ export type QueryTrackersArgs = {
last?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>; offset?: InputMaybe<Scalars['Int']['input']>;
order?: InputMaybe<Array<TrackerOrderInput>>; order?: InputMaybe<Array<TrackerOrderInput>>;
orderBy?: InputMaybe<TrackerOrderBy>;
orderByType?: InputMaybe<SortOrder>;
}; };
@@ -2212,9 +2241,11 @@ export type StringFilterInput = {
export type Subscription = { export type Subscription = {
__typename?: 'Subscription'; __typename?: 'Subscription';
/** @deprecated Replaced width downloadStatusChanged, replace with downloadStatusChanged(input) */ /** @deprecated Replaced with downloadStatusChanged, replace with downloadStatusChanged(input) */
downloadChanged: DownloadStatus; downloadChanged: DownloadStatus;
downloadStatusChanged: DownloadUpdates; downloadStatusChanged: DownloadUpdates;
libraryUpdateStatusChanged: UpdaterUpdates;
/** @deprecated Replaced with updates, replace with updates(input) */
updateStatusChanged: UpdateStatus; updateStatusChanged: UpdateStatus;
webUIUpdateStatusChange: WebUiUpdateStatus; webUIUpdateStatusChange: WebUiUpdateStatus;
}; };
@@ -2224,13 +2255,18 @@ export type SubscriptionDownloadStatusChangedArgs = {
input: DownloadChangedInput; input: DownloadChangedInput;
}; };
export type SubscriptionLibraryUpdateStatusChangedArgs = {
input: LibraryUpdateStatusChangedInput;
};
export type SwitchPreference = { export type SwitchPreference = {
__typename?: 'SwitchPreference'; __typename?: 'SwitchPreference';
currentValue?: Maybe<Scalars['Boolean']['output']>; currentValue?: Maybe<Scalars['Boolean']['output']>;
default: Scalars['Boolean']['output']; default: Scalars['Boolean']['output'];
key: Scalars['String']['output']; key: Scalars['String']['output'];
summary?: Maybe<Scalars['String']['output']>; summary?: Maybe<Scalars['String']['output']>;
title: Scalars['String']['output']; title?: Maybe<Scalars['String']['output']>;
visible: Scalars['Boolean']['output']; visible: Scalars['Boolean']['output'];
}; };
@@ -2545,6 +2581,11 @@ export type UpdateExtensionsPayload = {
extensions: Array<ExtensionType>; extensions: Array<ExtensionType>;
}; };
export type UpdateLibraryInput = {
categories?: InputMaybe<Array<Scalars['Int']['input']>>;
clientMutationId?: InputMaybe<Scalars['String']['input']>;
};
export type UpdateLibraryMangaInput = { export type UpdateLibraryMangaInput = {
clientMutationId?: InputMaybe<Scalars['String']['input']>; clientMutationId?: InputMaybe<Scalars['String']['input']>;
}; };
@@ -2555,6 +2596,12 @@ export type UpdateLibraryMangaPayload = {
updateStatus: UpdateStatus; updateStatus: UpdateStatus;
}; };
export type UpdateLibraryPayload = {
__typename?: 'UpdateLibraryPayload';
clientMutationId?: Maybe<Scalars['String']['output']>;
updateStatus: LibraryUpdateStatus;
};
export type UpdateMangaCategoriesInput = { export type UpdateMangaCategoriesInput = {
clientMutationId?: InputMaybe<Scalars['String']['input']>; clientMutationId?: InputMaybe<Scalars['String']['input']>;
id: Scalars['Int']['input']; id: Scalars['Int']['input'];
@@ -2685,6 +2732,26 @@ export type UpdateTrackPayload = {
trackRecord?: Maybe<TrackRecordType>; trackRecord?: Maybe<TrackRecordType>;
}; };
export type UpdaterJobsInfoType = {
__typename?: 'UpdaterJobsInfoType';
finishedJobs: Scalars['Int']['output'];
isRunning: Scalars['Boolean']['output'];
skippedCategoriesCount: Scalars['Int']['output'];
skippedMangasCount: Scalars['Int']['output'];
totalJobs: Scalars['Int']['output'];
};
export type UpdaterUpdates = {
__typename?: 'UpdaterUpdates';
categoryUpdates: Array<CategoryUpdateType>;
/** The current update status at the time of sending the initial message. Is null for all following messages */
initial?: Maybe<LibraryUpdateStatus>;
jobsInfo: UpdaterJobsInfoType;
mangaUpdates: Array<MangaUpdateType>;
/** Indicates whether updates have been omitted based on the "maxUpdates" subscription variable. In case updates have been omitted, the "updateStatus" query should be re-fetched. */
omittedUpdates: Scalars['Boolean']['output'];
};
export type ValidateBackupInput = { export type ValidateBackupInput = {
backup: Scalars['Upload']['input']; backup: Scalars['Upload']['input'];
}; };
@@ -2769,11 +2836,11 @@ export type ChapterStateFieldsFragment = { __typename?: 'ChapterType', id: numbe
export type ChapterReaderFieldsFragment = { __typename?: 'ChapterType', uploadDate: string, lastPageRead: number, pageCount: number, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean }; export type ChapterReaderFieldsFragment = { __typename?: 'ChapterType', uploadDate: string, lastPageRead: number, pageCount: number, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean };
export type ChapterListFieldsFragment = { __typename?: 'ChapterType', fetchedAt: string, uploadDate: string, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean }; export type ChapterListFieldsFragment = { __typename?: 'ChapterType', fetchedAt: string, uploadDate: string, lastReadAt: string, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean };
export type ChapterUpdateListFieldsFragment = { __typename?: 'ChapterType', fetchedAt: string, uploadDate: string, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean, manga: { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null, thumbnailUrlLastFetched?: string | null, inLibrary: boolean, initialized: boolean, sourceId: string } }; export type ChapterUpdateListFieldsFragment = { __typename?: 'ChapterType', fetchedAt: string, uploadDate: string, lastReadAt: string, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean, manga: { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null, thumbnailUrlLastFetched?: string | null, inLibrary: boolean, initialized: boolean, sourceId: string } };
export type ChapterHistoryListFieldsFragment = { __typename?: 'ChapterType', lastReadAt: string, lastPageRead: number, pageCount: number, uploadDate: string, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean, manga: { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null, thumbnailUrlLastFetched?: string | null, inLibrary: boolean, initialized: boolean, sourceId: string } }; export type ChapterHistoryListFieldsFragment = { __typename?: 'ChapterType', fetchedAt: string, uploadDate: string, lastReadAt: string, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean, manga: { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null, thumbnailUrlLastFetched?: string | null, inLibrary: boolean, initialized: boolean, sourceId: string } };
export type DownloadTypeFieldsFragment = { __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean }, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } }; export type DownloadTypeFieldsFragment = { __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean }, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } };
@@ -2823,7 +2890,7 @@ export type SourceListFieldsFragment = { __typename?: 'SourceType', lang: string
export type SourceBrowseFieldsFragment = { __typename?: 'SourceType', isConfigurable: boolean, supportsLatest: boolean, id: string, name: string, displayName: string, meta: Array<{ __typename?: 'SourceMetaType', sourceId: string, key: string, value: string }>, filters: Array<{ __typename?: 'CheckBoxFilter', name: string, type: 'CheckBoxFilter', CheckBoxFilterDefault: boolean } | { __typename?: 'GroupFilter', name: string, type: 'GroupFilter', filters: Array<{ __typename?: 'CheckBoxFilter', name: string, type: 'CheckBoxFilter', CheckBoxFilterDefault: boolean } | { __typename?: 'GroupFilter' } | { __typename?: 'HeaderFilter', name: string, type: 'HeaderFilter' } | { __typename?: 'SelectFilter', name: string, values: Array<string>, type: 'SelectFilter', SelectFilterDefault: number } | { __typename?: 'SeparatorFilter', name: string, type: 'SeparatorFilter' } | { __typename?: 'SortFilter', name: string, values: Array<string>, type: 'SortFilter', SortFilterDefault?: { __typename?: 'SortSelection', ascending: boolean, index: number } | null } | { __typename?: 'TextFilter', name: string, type: 'TextFilter', TextFilterDefault: string } | { __typename?: 'TriStateFilter', name: string, type: 'TriStateFilter', TriStateFilterDefault: TriState }> } | { __typename?: 'HeaderFilter', name: string, type: 'HeaderFilter' } | { __typename?: 'SelectFilter', name: string, values: Array<string>, type: 'SelectFilter', SelectFilterDefault: number } | { __typename?: 'SeparatorFilter', name: string, type: 'SeparatorFilter' } | { __typename?: 'SortFilter', name: string, values: Array<string>, type: 'SortFilter', SortFilterDefault?: { __typename?: 'SortSelection', ascending: boolean, index: number } | null } | { __typename?: 'TextFilter', name: string, type: 'TextFilter', TextFilterDefault: string } | { __typename?: 'TriStateFilter', name: string, type: 'TriStateFilter', TriStateFilterDefault: TriState }> }; export type SourceBrowseFieldsFragment = { __typename?: 'SourceType', isConfigurable: boolean, supportsLatest: boolean, id: string, name: string, displayName: string, meta: Array<{ __typename?: 'SourceMetaType', sourceId: string, key: string, value: string }>, filters: Array<{ __typename?: 'CheckBoxFilter', name: string, type: 'CheckBoxFilter', CheckBoxFilterDefault: boolean } | { __typename?: 'GroupFilter', name: string, type: 'GroupFilter', filters: Array<{ __typename?: 'CheckBoxFilter', name: string, type: 'CheckBoxFilter', CheckBoxFilterDefault: boolean } | { __typename?: 'GroupFilter' } | { __typename?: 'HeaderFilter', name: string, type: 'HeaderFilter' } | { __typename?: 'SelectFilter', name: string, values: Array<string>, type: 'SelectFilter', SelectFilterDefault: number } | { __typename?: 'SeparatorFilter', name: string, type: 'SeparatorFilter' } | { __typename?: 'SortFilter', name: string, values: Array<string>, type: 'SortFilter', SortFilterDefault?: { __typename?: 'SortSelection', ascending: boolean, index: number } | null } | { __typename?: 'TextFilter', name: string, type: 'TextFilter', TextFilterDefault: string } | { __typename?: 'TriStateFilter', name: string, type: 'TriStateFilter', TriStateFilterDefault: TriState }> } | { __typename?: 'HeaderFilter', name: string, type: 'HeaderFilter' } | { __typename?: 'SelectFilter', name: string, values: Array<string>, type: 'SelectFilter', SelectFilterDefault: number } | { __typename?: 'SeparatorFilter', name: string, type: 'SeparatorFilter' } | { __typename?: 'SortFilter', name: string, values: Array<string>, type: 'SortFilter', SortFilterDefault?: { __typename?: 'SortSelection', ascending: boolean, index: number } | null } | { __typename?: 'TextFilter', name: string, type: 'TextFilter', TextFilterDefault: string } | { __typename?: 'TriStateFilter', name: string, type: 'TriStateFilter', TriStateFilterDefault: TriState }> };
export type SourceSettingFieldsFragment = { __typename?: 'SourceType', id: string, name: string, displayName: string, preferences: Array<{ __typename?: 'CheckBoxPreference', summary?: string | null, key: string, type: 'CheckBoxPreference', CheckBoxCheckBoxCurrentValue?: boolean | null, CheckBoxDefault: boolean, CheckBoxTitle: string } | { __typename?: 'EditTextPreference', text?: string | null, summary?: string | null, key: string, dialogTitle?: string | null, dialogMessage?: string | null, type: 'EditTextPreference', EditTextPreferenceCurrentValue?: string | null, EditTextPreferenceDefault?: string | null, EditTextPreferenceTitle?: string | null } | { __typename?: 'ListPreference', summary?: string | null, key: string, entryValues: Array<string>, entries: Array<string>, type: 'ListPreference', ListPreferenceCurrentValue?: string | null, ListPreferenceDefault?: string | null, ListPreferenceTitle?: string | null } | { __typename?: 'MultiSelectListPreference', dialogMessage?: string | null, dialogTitle?: string | null, summary?: string | null, key: string, entryValues: Array<string>, entries: Array<string>, type: 'MultiSelectListPreference', MultiSelectListPreferenceTitle?: string | null, MultiSelectListPreferenceDefault?: Array<string> | null, MultiSelectListPreferenceCurrentValue?: Array<string> | null } | { __typename?: 'SwitchPreference', summary?: string | null, key: string, type: 'SwitchPreference', SwitchPreferenceCurrentValue?: boolean | null, SwitchPreferenceDefault: boolean, SwitchPreferenceTitle: string }> }; export type SourceSettingFieldsFragment = { __typename?: 'SourceType', id: string, name: string, displayName: string, preferences: Array<{ __typename?: 'CheckBoxPreference', summary?: string | null, key: string, type: 'CheckBoxPreference', CheckBoxCheckBoxCurrentValue?: boolean | null, CheckBoxDefault: boolean, CheckBoxTitle?: string | null } | { __typename?: 'EditTextPreference', text?: string | null, summary?: string | null, key: string, dialogTitle?: string | null, dialogMessage?: string | null, type: 'EditTextPreference', EditTextPreferenceCurrentValue?: string | null, EditTextPreferenceDefault?: string | null, EditTextPreferenceTitle?: string | null } | { __typename?: 'ListPreference', summary?: string | null, key: string, entryValues: Array<string>, entries: Array<string>, type: 'ListPreference', ListPreferenceCurrentValue?: string | null, ListPreferenceDefault?: string | null, ListPreferenceTitle?: string | null } | { __typename?: 'MultiSelectListPreference', dialogMessage?: string | null, dialogTitle?: string | null, summary?: string | null, key: string, entryValues: Array<string>, entries: Array<string>, type: 'MultiSelectListPreference', MultiSelectListPreferenceTitle?: string | null, MultiSelectListPreferenceDefault?: Array<string> | null, MultiSelectListPreferenceCurrentValue?: Array<string> | null } | { __typename?: 'SwitchPreference', summary?: string | null, key: string, type: 'SwitchPreference', SwitchPreferenceCurrentValue?: boolean | null, SwitchPreferenceDefault: boolean, SwitchPreferenceTitle?: string | null }> };
export type TrackerBaseFieldsFragment = { __typename?: 'TrackerType', id: number, name: string, icon: string, isLoggedIn: boolean, isTokenExpired: boolean }; export type TrackerBaseFieldsFragment = { __typename?: 'TrackerType', id: number, name: string, icon: string, isLoggedIn: boolean, isTokenExpired: boolean };
@@ -2835,9 +2902,15 @@ export type TrackRecordSearchFieldsFragment = { __typename?: 'TrackSearchType',
export type TrackRecordBindFieldsFragment = { __typename?: 'TrackRecordType', id: number, remoteId: string, trackerId: number, remoteUrl: string, title: string, status: number, lastChapterRead: number, totalChapters: number, score: number, displayScore: string, startDate: string, finishDate: string }; export type TrackRecordBindFieldsFragment = { __typename?: 'TrackRecordType', id: number, remoteId: string, trackerId: number, remoteUrl: string, title: string, status: number, lastChapterRead: number, totalChapters: number, score: number, displayScore: string, startDate: string, finishDate: string };
export type UpdaterMangaFieldsFragment = { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null }; export type UpdaterMangaFieldsFragment = { __typename?: 'MangaUpdateType', status: MangaJobStatus, manga: { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null } };
export type UpdaterSubscriptionFieldsFragment = { __typename?: 'UpdateStatus', isRunning: boolean, completeJobs: { __typename?: 'UpdateStatusType', mangas: { __typename?: 'MangaNodeList', totalCount: number, nodes: Array<{ __typename?: 'MangaType', id: number, unreadCount: number, downloadCount: number, bookmarkCount: number, hasDuplicateChapters: boolean, firstUnreadChapter?: { __typename?: 'ChapterType', id: number, sourceOrder: number } | null, lastReadChapter?: { __typename?: 'ChapterType', id: number, sourceOrder: number, lastReadAt: string } | null, latestReadChapter?: { __typename?: 'ChapterType', id: number, sourceOrder: number, lastReadAt: string } | null, latestFetchedChapter?: { __typename?: 'ChapterType', id: number, fetchedAt: string } | null, latestUploadedChapter?: { __typename?: 'ChapterType', id: number, uploadDate: string } | null, chapters: { __typename?: 'ChapterNodeList', totalCount: number } }> } }, failedJobs: { __typename?: 'UpdateStatusType', mangas: { __typename?: 'MangaNodeList', totalCount: number, nodes: Array<{ __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null }> } }, pendingJobs: { __typename?: 'UpdateStatusType', mangas: { __typename?: 'MangaNodeList', totalCount: number, nodes: Array<{ __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null }> } }, runningJobs: { __typename?: 'UpdateStatusType', mangas: { __typename?: 'MangaNodeList', totalCount: number, nodes: Array<{ __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null }> } } }; export type UpdaterCategoryFieldsFragment = { __typename?: 'CategoryUpdateType', status: CategoryJobStatus, category: { __typename?: 'CategoryType', id: number, name: string } };
export type UpdaterJobInfoFieldsFragment = { __typename?: 'UpdaterJobsInfoType', isRunning: boolean, totalJobs: number, finishedJobs: number, skippedCategoriesCount: number, skippedMangasCount: number };
export type UpdaterStatusFieldsFragment = { __typename?: 'LibraryUpdateStatus', jobsInfo: { __typename?: 'UpdaterJobsInfoType', isRunning: boolean, totalJobs: number, finishedJobs: number, skippedCategoriesCount: number, skippedMangasCount: number }, categoryUpdates: Array<{ __typename?: 'CategoryUpdateType', status: CategoryJobStatus, category: { __typename?: 'CategoryType', id: number, name: string } }>, mangaUpdates: Array<{ __typename?: 'MangaUpdateType', status: MangaJobStatus, manga: { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null } }> };
export type UpdaterSubscriptionFieldsFragment = { __typename?: 'UpdaterUpdates', omittedUpdates: boolean, jobsInfo: { __typename?: 'UpdaterJobsInfoType', isRunning: boolean, totalJobs: number, finishedJobs: number, skippedCategoriesCount: number, skippedMangasCount: number }, categoryUpdates: Array<{ __typename?: 'CategoryUpdateType', status: CategoryJobStatus, category: { __typename?: 'CategoryType', id: number, name: string } }>, mangaUpdates: Array<{ __typename?: 'MangaUpdateType', status: MangaJobStatus, manga: { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null } }> };
export type UpdaterStartStopFieldsFragment = { __typename?: 'UpdateStatus', isRunning: boolean }; export type UpdaterStartStopFieldsFragment = { __typename?: 'UpdateStatus', isRunning: boolean };
@@ -2931,7 +3004,7 @@ export type GetMangaChaptersFetchMutationVariables = Exact<{
}>; }>;
export type GetMangaChaptersFetchMutation = { __typename?: 'Mutation', fetchChapters?: { __typename?: 'FetchChaptersPayload', chapters: Array<{ __typename?: 'ChapterType', fetchedAt: string, uploadDate: string, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean, manga: { __typename?: 'MangaType', id: number, unreadCount: number, downloadCount: number, bookmarkCount: number, hasDuplicateChapters: boolean, chapters: { __typename?: 'ChapterNodeList', totalCount: number }, firstUnreadChapter?: { __typename?: 'ChapterType', id: number, sourceOrder: number, isRead: boolean, mangaId: number } | null, lastReadChapter?: { __typename?: 'ChapterType', id: number, sourceOrder: number, lastReadAt: string } | null, latestReadChapter?: { __typename?: 'ChapterType', id: number, sourceOrder: number, lastReadAt: string } | null, latestFetchedChapter?: { __typename?: 'ChapterType', id: number, fetchedAt: string } | null, latestUploadedChapter?: { __typename?: 'ChapterType', id: number, uploadDate: string } | null } }> } | null }; export type GetMangaChaptersFetchMutation = { __typename?: 'Mutation', fetchChapters?: { __typename?: 'FetchChaptersPayload', chapters: Array<{ __typename?: 'ChapterType', fetchedAt: string, uploadDate: string, lastReadAt: string, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean, manga: { __typename?: 'MangaType', id: number, unreadCount: number, downloadCount: number, bookmarkCount: number, hasDuplicateChapters: boolean, chapters: { __typename?: 'ChapterNodeList', totalCount: number }, firstUnreadChapter?: { __typename?: 'ChapterType', id: number, sourceOrder: number, isRead: boolean, mangaId: number } | null, lastReadChapter?: { __typename?: 'ChapterType', id: number, sourceOrder: number, lastReadAt: string } | null, latestReadChapter?: { __typename?: 'ChapterType', id: number, sourceOrder: number, lastReadAt: string } | null, latestFetchedChapter?: { __typename?: 'ChapterType', id: number, fetchedAt: string } | null, latestUploadedChapter?: { __typename?: 'ChapterType', id: number, uploadDate: string } | null } }> } | null };
export type SetChapterMetadataMutationVariables = Exact<{ export type SetChapterMetadataMutationVariables = Exact<{
input: SetChapterMetaInput; input: SetChapterMetaInput;
@@ -3188,7 +3261,7 @@ export type UpdateSourcePreferencesMutationVariables = Exact<{
}>; }>;
export type UpdateSourcePreferencesMutation = { __typename?: 'Mutation', updateSourcePreference?: { __typename?: 'UpdateSourcePreferencePayload', source: { __typename?: 'SourceType', id: string, name: string, displayName: string, preferences: Array<{ __typename?: 'CheckBoxPreference', summary?: string | null, key: string, type: 'CheckBoxPreference', CheckBoxCheckBoxCurrentValue?: boolean | null, CheckBoxDefault: boolean, CheckBoxTitle: string } | { __typename?: 'EditTextPreference', text?: string | null, summary?: string | null, key: string, dialogTitle?: string | null, dialogMessage?: string | null, type: 'EditTextPreference', EditTextPreferenceCurrentValue?: string | null, EditTextPreferenceDefault?: string | null, EditTextPreferenceTitle?: string | null } | { __typename?: 'ListPreference', summary?: string | null, key: string, entryValues: Array<string>, entries: Array<string>, type: 'ListPreference', ListPreferenceCurrentValue?: string | null, ListPreferenceDefault?: string | null, ListPreferenceTitle?: string | null } | { __typename?: 'MultiSelectListPreference', dialogMessage?: string | null, dialogTitle?: string | null, summary?: string | null, key: string, entryValues: Array<string>, entries: Array<string>, type: 'MultiSelectListPreference', MultiSelectListPreferenceTitle?: string | null, MultiSelectListPreferenceDefault?: Array<string> | null, MultiSelectListPreferenceCurrentValue?: Array<string> | null } | { __typename?: 'SwitchPreference', summary?: string | null, key: string, type: 'SwitchPreference', SwitchPreferenceCurrentValue?: boolean | null, SwitchPreferenceDefault: boolean, SwitchPreferenceTitle: string }> } } | null }; export type UpdateSourcePreferencesMutation = { __typename?: 'Mutation', updateSourcePreference?: { __typename?: 'UpdateSourcePreferencePayload', source: { __typename?: 'SourceType', id: string, name: string, displayName: string, preferences: Array<{ __typename?: 'CheckBoxPreference', summary?: string | null, key: string, type: 'CheckBoxPreference', CheckBoxCheckBoxCurrentValue?: boolean | null, CheckBoxDefault: boolean, CheckBoxTitle?: string | null } | { __typename?: 'EditTextPreference', text?: string | null, summary?: string | null, key: string, dialogTitle?: string | null, dialogMessage?: string | null, type: 'EditTextPreference', EditTextPreferenceCurrentValue?: string | null, EditTextPreferenceDefault?: string | null, EditTextPreferenceTitle?: string | null } | { __typename?: 'ListPreference', summary?: string | null, key: string, entryValues: Array<string>, entries: Array<string>, type: 'ListPreference', ListPreferenceCurrentValue?: string | null, ListPreferenceDefault?: string | null, ListPreferenceTitle?: string | null } | { __typename?: 'MultiSelectListPreference', dialogMessage?: string | null, dialogTitle?: string | null, summary?: string | null, key: string, entryValues: Array<string>, entries: Array<string>, type: 'MultiSelectListPreference', MultiSelectListPreferenceTitle?: string | null, MultiSelectListPreferenceDefault?: Array<string> | null, MultiSelectListPreferenceCurrentValue?: Array<string> | null } | { __typename?: 'SwitchPreference', summary?: string | null, key: string, type: 'SwitchPreference', SwitchPreferenceCurrentValue?: boolean | null, SwitchPreferenceDefault: boolean, SwitchPreferenceTitle?: string | null }> } } | null };
export type SetSourceMetadataMutationVariables = Exact<{ export type SetSourceMetadataMutationVariables = Exact<{
input: SetSourceMetaInput; input: SetSourceMetaInput;
@@ -3255,19 +3328,12 @@ export type TrackerFetchBindMutationVariables = Exact<{
export type TrackerFetchBindMutation = { __typename?: 'Mutation', fetchTrack: { __typename?: 'FetchTrackPayload', trackRecord: { __typename?: 'TrackRecordType', id: number, remoteId: string, trackerId: number, remoteUrl: string, title: string, status: number, lastChapterRead: number, totalChapters: number, score: number, displayScore: string, startDate: string, finishDate: string } } }; export type TrackerFetchBindMutation = { __typename?: 'Mutation', fetchTrack: { __typename?: 'FetchTrackPayload', trackRecord: { __typename?: 'TrackRecordType', id: number, remoteId: string, trackerId: number, remoteUrl: string, title: string, status: number, lastChapterRead: number, totalChapters: number, score: number, displayScore: string, startDate: string, finishDate: string } } };
export type UpdateCategoryMangasMutationVariables = Exact<{ export type UpdateLibraryMutationVariables = Exact<{
input: UpdateCategoryMangaInput; input?: InputMaybe<UpdateLibraryInput>;
}>; }>;
export type UpdateCategoryMangasMutation = { __typename?: 'Mutation', updateCategoryManga?: { __typename?: 'UpdateCategoryMangaPayload', updateStatus: { __typename?: 'UpdateStatus', isRunning: boolean } } | null }; export type UpdateLibraryMutation = { __typename?: 'Mutation', updateLibrary?: { __typename?: 'UpdateLibraryPayload', updateStatus: { __typename?: 'LibraryUpdateStatus', jobsInfo: { __typename?: 'UpdaterJobsInfoType', isRunning: boolean, totalJobs: number, finishedJobs: number, skippedCategoriesCount: number, skippedMangasCount: number }, categoryUpdates: Array<{ __typename?: 'CategoryUpdateType', status: CategoryJobStatus, category: { __typename?: 'CategoryType', id: number, name: string } }>, mangaUpdates: Array<{ __typename?: 'MangaUpdateType', status: MangaJobStatus, manga: { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null } }> } } | null };
export type UpdateLibraryMangasMutationVariables = Exact<{
input?: InputMaybe<UpdateLibraryMangaInput>;
}>;
export type UpdateLibraryMangasMutation = { __typename?: 'Mutation', updateLibraryManga?: { __typename?: 'UpdateLibraryMangaPayload', updateStatus: { __typename?: 'UpdateStatus', isRunning: boolean } } | null };
export type StopUpdaterMutationVariables = Exact<{ export type StopUpdaterMutationVariables = Exact<{
input?: InputMaybe<UpdateStopInput>; input?: InputMaybe<UpdateStopInput>;
@@ -3365,7 +3431,7 @@ export type GetChaptersMangaQueryVariables = Exact<{
}>; }>;
export type GetChaptersMangaQuery = { __typename?: 'Query', chapters: { __typename?: 'ChapterNodeList', totalCount: number, nodes: Array<{ __typename?: 'ChapterType', fetchedAt: string, uploadDate: string, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean }>, pageInfo: { __typename?: 'PageInfo', endCursor?: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor?: string | null } } }; export type GetChaptersMangaQuery = { __typename?: 'Query', chapters: { __typename?: 'ChapterNodeList', totalCount: number, nodes: Array<{ __typename?: 'ChapterType', fetchedAt: string, uploadDate: string, lastReadAt: string, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean }>, pageInfo: { __typename?: 'PageInfo', endCursor?: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor?: string | null } } };
export type GetChaptersUpdatesQueryVariables = Exact<{ export type GetChaptersUpdatesQueryVariables = Exact<{
after?: InputMaybe<Scalars['Cursor']['input']>; after?: InputMaybe<Scalars['Cursor']['input']>;
@@ -3378,7 +3444,8 @@ export type GetChaptersUpdatesQueryVariables = Exact<{
order?: InputMaybe<Array<ChapterOrderInput> | ChapterOrderInput>; order?: InputMaybe<Array<ChapterOrderInput> | ChapterOrderInput>;
}>; }>;
export type GetChaptersUpdatesQuery = { __typename?: 'Query', chapters: { __typename?: 'ChapterNodeList', totalCount: number, nodes: Array<{ __typename?: 'ChapterType', fetchedAt: string, uploadDate: string, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean, manga: { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null, thumbnailUrlLastFetched?: string | null, inLibrary: boolean, initialized: boolean, sourceId: string } }>, pageInfo: { __typename?: 'PageInfo', endCursor?: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor?: string | null } } };
export type GetChaptersUpdatesQuery = { __typename?: 'Query', chapters: { __typename?: 'ChapterNodeList', totalCount: number, nodes: Array<{ __typename?: 'ChapterType', fetchedAt: string, uploadDate: string, lastReadAt: string, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean, manga: { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null, thumbnailUrlLastFetched?: string | null, inLibrary: boolean, initialized: boolean, sourceId: string } }>, pageInfo: { __typename?: 'PageInfo', endCursor?: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor?: string | null } } };
export type GetChaptersHistoryQueryVariables = Exact<{ export type GetChaptersHistoryQueryVariables = Exact<{
after?: InputMaybe<Scalars['Cursor']['input']>; after?: InputMaybe<Scalars['Cursor']['input']>;
@@ -3391,7 +3458,8 @@ export type GetChaptersHistoryQueryVariables = Exact<{
order?: InputMaybe<Array<ChapterOrderInput> | ChapterOrderInput>; order?: InputMaybe<Array<ChapterOrderInput> | ChapterOrderInput>;
}>; }>;
export type GetChaptersHistoryQuery = { __typename?: 'Query', chapters: { __typename?: 'ChapterNodeList', totalCount: number, nodes: Array<{ __typename?: 'ChapterType', lastReadAt: string, lastPageRead: number, pageCount: number, uploadDate: string, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean, manga: { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null, thumbnailUrlLastFetched?: string | null, inLibrary: boolean, initialized: boolean, sourceId: string } }>, pageInfo: { __typename?: 'PageInfo', endCursor?: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor?: string | null } } };
export type GetChaptersHistoryQuery = { __typename?: 'Query', chapters: { __typename?: 'ChapterNodeList', totalCount: number, nodes: Array<{ __typename?: 'ChapterType', fetchedAt: string, uploadDate: string, lastReadAt: string, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean, manga: { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null, thumbnailUrlLastFetched?: string | null, inLibrary: boolean, initialized: boolean, sourceId: string } }>, pageInfo: { __typename?: 'PageInfo', endCursor?: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor?: string | null } } };
export type GetMangasChapterIdsWithStateQueryVariables = Exact<{ export type GetMangasChapterIdsWithStateQueryVariables = Exact<{
mangaIds: Array<Scalars['Int']['input']> | Scalars['Int']['input']; mangaIds: Array<Scalars['Int']['input']> | Scalars['Int']['input'];
@@ -3572,7 +3640,7 @@ export type GetSourceSettingsQueryVariables = Exact<{
}>; }>;
export type GetSourceSettingsQuery = { __typename?: 'Query', source: { __typename?: 'SourceType', id: string, name: string, displayName: string, preferences: Array<{ __typename?: 'CheckBoxPreference', summary?: string | null, key: string, type: 'CheckBoxPreference', CheckBoxCheckBoxCurrentValue?: boolean | null, CheckBoxDefault: boolean, CheckBoxTitle: string } | { __typename?: 'EditTextPreference', text?: string | null, summary?: string | null, key: string, dialogTitle?: string | null, dialogMessage?: string | null, type: 'EditTextPreference', EditTextPreferenceCurrentValue?: string | null, EditTextPreferenceDefault?: string | null, EditTextPreferenceTitle?: string | null } | { __typename?: 'ListPreference', summary?: string | null, key: string, entryValues: Array<string>, entries: Array<string>, type: 'ListPreference', ListPreferenceCurrentValue?: string | null, ListPreferenceDefault?: string | null, ListPreferenceTitle?: string | null } | { __typename?: 'MultiSelectListPreference', dialogMessage?: string | null, dialogTitle?: string | null, summary?: string | null, key: string, entryValues: Array<string>, entries: Array<string>, type: 'MultiSelectListPreference', MultiSelectListPreferenceTitle?: string | null, MultiSelectListPreferenceDefault?: Array<string> | null, MultiSelectListPreferenceCurrentValue?: Array<string> | null } | { __typename?: 'SwitchPreference', summary?: string | null, key: string, type: 'SwitchPreference', SwitchPreferenceCurrentValue?: boolean | null, SwitchPreferenceDefault: boolean, SwitchPreferenceTitle: string }> } }; export type GetSourceSettingsQuery = { __typename?: 'Query', source: { __typename?: 'SourceType', id: string, name: string, displayName: string, preferences: Array<{ __typename?: 'CheckBoxPreference', summary?: string | null, key: string, type: 'CheckBoxPreference', CheckBoxCheckBoxCurrentValue?: boolean | null, CheckBoxDefault: boolean, CheckBoxTitle?: string | null } | { __typename?: 'EditTextPreference', text?: string | null, summary?: string | null, key: string, dialogTitle?: string | null, dialogMessage?: string | null, type: 'EditTextPreference', EditTextPreferenceCurrentValue?: string | null, EditTextPreferenceDefault?: string | null, EditTextPreferenceTitle?: string | null } | { __typename?: 'ListPreference', summary?: string | null, key: string, entryValues: Array<string>, entries: Array<string>, type: 'ListPreference', ListPreferenceCurrentValue?: string | null, ListPreferenceDefault?: string | null, ListPreferenceTitle?: string | null } | { __typename?: 'MultiSelectListPreference', dialogMessage?: string | null, dialogTitle?: string | null, summary?: string | null, key: string, entryValues: Array<string>, entries: Array<string>, type: 'MultiSelectListPreference', MultiSelectListPreferenceTitle?: string | null, MultiSelectListPreferenceDefault?: Array<string> | null, MultiSelectListPreferenceCurrentValue?: Array<string> | null } | { __typename?: 'SwitchPreference', summary?: string | null, key: string, type: 'SwitchPreference', SwitchPreferenceCurrentValue?: boolean | null, SwitchPreferenceDefault: boolean, SwitchPreferenceTitle?: string | null }> } };
export type GetSourceMigratableQueryVariables = Exact<{ export type GetSourceMigratableQueryVariables = Exact<{
id: Scalars['LongString']['input']; id: Scalars['LongString']['input'];
@@ -3612,7 +3680,7 @@ export type TrackerSearchQuery = { __typename?: 'Query', searchTracker: { __type
export type GetUpdateStatusQueryVariables = Exact<{ [key: string]: never; }>; export type GetUpdateStatusQueryVariables = Exact<{ [key: string]: never; }>;
export type GetUpdateStatusQuery = { __typename?: 'Query', updateStatus: { __typename?: 'UpdateStatus', isRunning: boolean, completeJobs: { __typename?: 'UpdateStatusType', mangas: { __typename?: 'MangaNodeList', totalCount: number, nodes: Array<{ __typename?: 'MangaType', id: number, unreadCount: number, downloadCount: number, bookmarkCount: number, hasDuplicateChapters: boolean, firstUnreadChapter?: { __typename?: 'ChapterType', id: number, sourceOrder: number } | null, lastReadChapter?: { __typename?: 'ChapterType', id: number, sourceOrder: number, lastReadAt: string } | null, latestReadChapter?: { __typename?: 'ChapterType', id: number, sourceOrder: number, lastReadAt: string } | null, latestFetchedChapter?: { __typename?: 'ChapterType', id: number, fetchedAt: string } | null, latestUploadedChapter?: { __typename?: 'ChapterType', id: number, uploadDate: string } | null, chapters: { __typename?: 'ChapterNodeList', totalCount: number } }> } }, failedJobs: { __typename?: 'UpdateStatusType', mangas: { __typename?: 'MangaNodeList', totalCount: number, nodes: Array<{ __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null }> } }, pendingJobs: { __typename?: 'UpdateStatusType', mangas: { __typename?: 'MangaNodeList', totalCount: number, nodes: Array<{ __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null }> } }, runningJobs: { __typename?: 'UpdateStatusType', mangas: { __typename?: 'MangaNodeList', totalCount: number, nodes: Array<{ __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null }> } } } }; export type GetUpdateStatusQuery = { __typename?: 'Query', libraryUpdateStatus: { __typename?: 'LibraryUpdateStatus', jobsInfo: { __typename?: 'UpdaterJobsInfoType', isRunning: boolean, totalJobs: number, finishedJobs: number, skippedCategoriesCount: number, skippedMangasCount: number }, categoryUpdates: Array<{ __typename?: 'CategoryUpdateType', status: CategoryJobStatus, category: { __typename?: 'CategoryType', id: number, name: string } }>, mangaUpdates: Array<{ __typename?: 'MangaUpdateType', status: MangaJobStatus, manga: { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null } }> } };
export type GetLastUpdateTimestampQueryVariables = Exact<{ [key: string]: never; }>; export type GetLastUpdateTimestampQueryVariables = Exact<{ [key: string]: never; }>;
@@ -3631,7 +3699,9 @@ export type WebuiUpdateSubscriptionVariables = Exact<{ [key: string]: never; }>;
export type WebuiUpdateSubscription = { __typename?: 'Subscription', webUIUpdateStatusChange: { __typename?: 'WebUIUpdateStatus', progress: number, state: UpdateState, info: { __typename?: 'WebUIUpdateInfo', channel: string, tag: string } } }; export type WebuiUpdateSubscription = { __typename?: 'Subscription', webUIUpdateStatusChange: { __typename?: 'WebUIUpdateStatus', progress: number, state: UpdateState, info: { __typename?: 'WebUIUpdateInfo', channel: string, tag: string } } };
export type UpdaterSubscriptionVariables = Exact<{ [key: string]: never; }>; export type UpdaterSubscriptionVariables = Exact<{
input: LibraryUpdateStatusChangedInput;
}>;
export type UpdaterSubscription = { __typename?: 'Subscription', updateStatusChanged: { __typename?: 'UpdateStatus', isRunning: boolean, completeJobs: { __typename?: 'UpdateStatusType', mangas: { __typename?: 'MangaNodeList', totalCount: number, nodes: Array<{ __typename?: 'MangaType', id: number, unreadCount: number, downloadCount: number, bookmarkCount: number, hasDuplicateChapters: boolean, firstUnreadChapter?: { __typename?: 'ChapterType', id: number, sourceOrder: number } | null, lastReadChapter?: { __typename?: 'ChapterType', id: number, sourceOrder: number, lastReadAt: string } | null, latestReadChapter?: { __typename?: 'ChapterType', id: number, sourceOrder: number, lastReadAt: string } | null, latestFetchedChapter?: { __typename?: 'ChapterType', id: number, fetchedAt: string } | null, latestUploadedChapter?: { __typename?: 'ChapterType', id: number, uploadDate: string } | null, chapters: { __typename?: 'ChapterNodeList', totalCount: number } }> } }, failedJobs: { __typename?: 'UpdateStatusType', mangas: { __typename?: 'MangaNodeList', totalCount: number, nodes: Array<{ __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null }> } }, pendingJobs: { __typename?: 'UpdateStatusType', mangas: { __typename?: 'MangaNodeList', totalCount: number, nodes: Array<{ __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null }> } }, runningJobs: { __typename?: 'UpdateStatusType', mangas: { __typename?: 'MangaNodeList', totalCount: number, nodes: Array<{ __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null }> } } } }; export type UpdaterSubscription = { __typename?: 'Subscription', libraryUpdateStatusChanged: { __typename?: 'UpdaterUpdates', omittedUpdates: boolean, jobsInfo: { __typename?: 'UpdaterJobsInfoType', isRunning: boolean, totalJobs: number, finishedJobs: number, skippedCategoriesCount: number, skippedMangasCount: number }, categoryUpdates: Array<{ __typename?: 'CategoryUpdateType', status: CategoryJobStatus, category: { __typename?: 'CategoryType', id: number, name: string } }>, mangaUpdates: Array<{ __typename?: 'MangaUpdateType', status: MangaJobStatus, manga: { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null } }> } };

View File

@@ -7,27 +7,15 @@
*/ */
import gql from 'graphql-tag'; import gql from 'graphql-tag';
import { UPDATER_START_STOP_FIELDS } from '@/lib/graphql/fragments/UpdaterFragments.ts'; import { UPDATER_STATUS_FIELDS } from '@/lib/graphql/fragments/UpdaterFragments.ts';
export const UPDATE_CATEGORY_MANGAS = gql` export const UPDATE_LIBRARY = gql`
${UPDATER_START_STOP_FIELDS} ${UPDATER_STATUS_FIELDS}
mutation UPDATE_CATEGORY_MANGAS($input: UpdateCategoryMangaInput!) { mutation UPDATE_LIBRARY($input: UpdateLibraryInput = {}) {
updateCategoryManga(input: $input) { updateLibrary(input: $input) {
updateStatus { updateStatus {
...UPDATER_START_STOP_FIELDS ...UPDATER_STATUS_FIELDS
}
}
}
`;
export const UPDATE_LIBRARY_MANGAS = gql`
${UPDATER_START_STOP_FIELDS}
mutation UPDATE_LIBRARY_MANGAS($input: UpdateLibraryMangaInput = {}) {
updateLibraryManga(input: $input) {
updateStatus {
...UPDATER_START_STOP_FIELDS
} }
} }
} }

View File

@@ -7,14 +7,14 @@
*/ */
import gql from 'graphql-tag'; import gql from 'graphql-tag';
import { UPDATER_SUBSCRIPTION_FIELDS } from '@/lib/graphql/fragments/UpdaterFragments.ts'; import { UPDATER_STATUS_FIELDS } from '@/lib/graphql/fragments/UpdaterFragments.ts';
export const GET_UPDATE_STATUS = gql` export const GET_UPDATE_STATUS = gql`
${UPDATER_SUBSCRIPTION_FIELDS} ${UPDATER_STATUS_FIELDS}
query GET_UPDATE_STATUS { query GET_UPDATE_STATUS {
updateStatus { libraryUpdateStatus {
...UPDATER_SUBSCRIPTION_FIELDS ...UPDATER_STATUS_FIELDS
} }
} }
`; `;

View File

@@ -12,8 +12,8 @@ import { UPDATER_SUBSCRIPTION_FIELDS } from '@/lib/graphql/fragments/UpdaterFrag
export const UPDATER_SUBSCRIPTION = gql` export const UPDATER_SUBSCRIPTION = gql`
${UPDATER_SUBSCRIPTION_FIELDS} ${UPDATER_SUBSCRIPTION_FIELDS}
subscription UPDATER_SUBSCRIPTION { subscription UPDATER_SUBSCRIPTION($input: LibraryUpdateStatusChangedInput!) {
updateStatusChanged { libraryUpdateStatusChanged(input: $input) {
...UPDATER_SUBSCRIPTION_FIELDS ...UPDATER_SUBSCRIPTION_FIELDS
} }
} }

View File

@@ -170,8 +170,6 @@ import {
TrackerUnbindMutationVariables, TrackerUnbindMutationVariables,
TrackerUpdateBindMutation, TrackerUpdateBindMutation,
TrackerUpdateBindMutationVariables, TrackerUpdateBindMutationVariables,
UpdateCategoryMangasMutation,
UpdateCategoryMangasMutationVariables,
UpdateCategoryMutation, UpdateCategoryMutation,
UpdateCategoryMutationVariables, UpdateCategoryMutationVariables,
UpdateCategoryOrderMutation, UpdateCategoryOrderMutation,
@@ -187,8 +185,6 @@ import {
UpdateExtensionPatchInput, UpdateExtensionPatchInput,
UpdateExtensionsMutation, UpdateExtensionsMutation,
UpdateExtensionsMutationVariables, UpdateExtensionsMutationVariables,
UpdateLibraryMangasMutation,
UpdateLibraryMangasMutationVariables,
UpdateMangaCategoriesMutation, UpdateMangaCategoriesMutation,
UpdateMangaCategoriesMutationVariables, UpdateMangaCategoriesMutationVariables,
UpdateMangaCategoriesPatchInput, UpdateMangaCategoriesPatchInput,
@@ -211,6 +207,8 @@ import {
ValidateBackupQuery, ValidateBackupQuery,
ValidateBackupQueryVariables, ValidateBackupQueryVariables,
WebuiUpdateSubscription, WebuiUpdateSubscription,
UpdateLibraryMutation,
UpdateLibraryMutationVariables,
} from '@/lib/graphql/generated/graphql.ts'; } from '@/lib/graphql/generated/graphql.ts';
import { GET_GLOBAL_METADATAS } from '@/lib/graphql/queries/GlobalMetadataQuery.ts'; import { GET_GLOBAL_METADATAS } from '@/lib/graphql/queries/GlobalMetadataQuery.ts';
import { DELETE_GLOBAL_METADATA, SET_GLOBAL_METADATA } from '@/lib/graphql/mutations/GlobalMetadataMutation.ts'; import { DELETE_GLOBAL_METADATA, SET_GLOBAL_METADATA } from '@/lib/graphql/mutations/GlobalMetadataMutation.ts';
@@ -290,11 +288,7 @@ import {
UPDATE_CATEGORY, UPDATE_CATEGORY,
UPDATE_CATEGORY_ORDER, UPDATE_CATEGORY_ORDER,
} from '@/lib/graphql/mutations/CategoryMutation.ts'; } from '@/lib/graphql/mutations/CategoryMutation.ts';
import { import { STOP_UPDATER, UPDATE_LIBRARY } from '@/lib/graphql/mutations/UpdaterMutation.ts';
STOP_UPDATER,
UPDATE_CATEGORY_MANGAS,
UPDATE_LIBRARY_MANGAS,
} from '@/lib/graphql/mutations/UpdaterMutation.ts';
import { GET_LAST_UPDATE_TIMESTAMP, GET_UPDATE_STATUS } from '@/lib/graphql/queries/UpdaterQuery.ts'; import { GET_LAST_UPDATE_TIMESTAMP, GET_UPDATE_STATUS } from '@/lib/graphql/queries/UpdaterQuery.ts';
import { CustomCache } from '@/lib/storage/CustomCache.ts'; import { CustomCache } from '@/lib/storage/CustomCache.ts';
import { RESTORE_BACKUP } from '@/lib/graphql/mutations/BackupMutation.ts'; import { RESTORE_BACKUP } from '@/lib/graphql/mutations/BackupMutation.ts';
@@ -2925,35 +2919,11 @@ export class RequestManager {
} as typeof result; } as typeof result;
} }
public startGlobalUpdate(
categories?: undefined,
options?: MutationOptions<UpdateLibraryMangasMutation, UpdateLibraryMangasMutationVariables>,
): AbortableApolloMutationResponse<UpdateLibraryMangasMutation>;
public startGlobalUpdate( public startGlobalUpdate(
categories?: number[], categories?: number[],
options?: MutationOptions<UpdateCategoryMangasMutation, UpdateCategoryMangasMutationVariables>, options?: MutationOptions<UpdateLibraryMutation, UpdateLibraryMutationVariables>,
): AbortableApolloMutationResponse<UpdateCategoryMangasMutation>; ): AbortableApolloMutationResponse<UpdateLibraryMutation> {
return this.doRequest(GQLMethod.MUTATION, UPDATE_LIBRARY, { input: { categories } }, options);
public startGlobalUpdate<
Data extends UpdateLibraryMangasMutation | UpdateCategoryMangasMutation,
Variables extends UpdateLibraryMangasMutationVariables | UpdateCategoryMangasMutationVariables,
>(categories?: number[], options?: MutationOptions<Data, Variables>): AbortableApolloMutationResponse<Data> {
if (categories?.length) {
return this.doRequest<UpdateCategoryMangasMutation, UpdateCategoryMangasMutationVariables>(
GQLMethod.MUTATION,
UPDATE_CATEGORY_MANGAS,
{ input: { categories } },
options as MutationOptions<UpdateCategoryMangasMutation, UpdateCategoryMangasMutationVariables>,
) as AbortableApolloMutationResponse<Data>;
}
return this.doRequest<UpdateLibraryMangasMutation, UpdateLibraryMangasMutationVariables>(
GQLMethod.MUTATION,
UPDATE_LIBRARY_MANGAS,
{},
options as MutationOptions<UpdateLibraryMangasMutation, UpdateLibraryMangasMutationVariables>,
) as AbortableApolloMutationResponse<Data>;
} }
public resetGlobalUpdate( public resetGlobalUpdate(
@@ -3025,7 +2995,27 @@ export class RequestManager {
public useUpdaterSubscription( public useUpdaterSubscription(
options?: SubscriptionHookOptions<UpdaterSubscription, UpdaterSubscriptionVariables>, options?: SubscriptionHookOptions<UpdaterSubscription, UpdaterSubscriptionVariables>,
): SubscriptionResult<UpdaterSubscription, UpdaterSubscriptionVariables> { ): SubscriptionResult<UpdaterSubscription, UpdaterSubscriptionVariables> {
return this.doRequest(GQLMethod.USE_SUBSCRIPTION, UPDATER_SUBSCRIPTION, {}, options); return this.doRequest(
GQLMethod.USE_SUBSCRIPTION,
UPDATER_SUBSCRIPTION,
{ input: { maxUpdates: 30 } },
{
...options,
onData: (onDataOptions) => {
const updatesChanged = onDataOptions.data.data?.libraryUpdateStatusChanged;
if (!updatesChanged?.omittedUpdates) {
return;
}
const { cache } = this.graphQLClient.client;
cache.gc();
cache.evict({ broadcast: true, id: 'LibraryUpdateStatus' });
cache.evict({ broadcast: true, fieldName: 'libraryUpdateStatus' });
},
},
);
} }
public useGetServerSettings( public useGetServerSettings(

View File

@@ -62,6 +62,9 @@ const typePolicies: StrictTypedTypePolicies = {
}, },
}, },
DownloadType: { keyFields: ['chapter'] }, DownloadType: { keyFields: ['chapter'] },
CategoryUpdateType: { keyFields: ['category'] },
MangaUpdateType: { keyFields: ['manga'] },
UpdaterJobsInfoType: { keyFields: [] },
WebUIUpdateStatus: { keyFields: [] }, WebUIUpdateStatus: { keyFields: [] },
UpdateStatus: { keyFields: [] }, UpdateStatus: { keyFields: [] },
Query: { Query: {

View File

@@ -6,7 +6,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/ */
import { useEffect, useMemo, useState } from 'react'; import { useEffect, useState } from 'react';
import IconButton from '@mui/material/IconButton'; import IconButton from '@mui/material/IconButton';
import RefreshIcon from '@mui/icons-material/Refresh'; import RefreshIcon from '@mui/icons-material/Refresh';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
@@ -18,7 +18,6 @@ import Stack from '@mui/material/Stack';
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx'; import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
import { requestManager } from '@/lib/requests/RequestManager.ts'; import { requestManager } from '@/lib/requests/RequestManager.ts';
import { makeToast } from '@/modules/core/utils/Toast.ts'; import { makeToast } from '@/modules/core/utils/Toast.ts';
import { UpdaterSubscription } from '@/lib/graphql/generated/graphql.ts';
import { Progress } from '@/modules/core/components/Progress.tsx'; import { Progress } from '@/modules/core/components/Progress.tsx';
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts'; import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
import { dateTimeFormatter } from '@/util/DateHelper.ts'; import { dateTimeFormatter } from '@/util/DateHelper.ts';
@@ -27,19 +26,6 @@ import { MediaQuery } from '@/modules/core/utils/MediaQuery.tsx';
import { CategoryIdInfo } from '@/modules/category/Category.types.ts'; import { CategoryIdInfo } from '@/modules/category/Category.types.ts';
import { getErrorMessage } from '@/lib/HelperFunctions.ts'; import { getErrorMessage } from '@/lib/HelperFunctions.ts';
const calcProgress = (status: UpdaterSubscription['updateStatusChanged'] | undefined) => {
if (!status) {
return 0;
}
const finishedUpdates = status.failedJobs.mangas.totalCount + status.completeJobs.mangas.totalCount;
const totalMangas = finishedUpdates + status.pendingJobs.mangas.totalCount + status.runningJobs.mangas.totalCount;
const progress = 100 * (finishedUpdates / totalMangas);
return Number.isNaN(progress) ? 0 : progress;
};
let lastRunningState = false; let lastRunningState = false;
export function UpdateChecker({ export function UpdateChecker({
@@ -58,21 +44,13 @@ export function UpdateChecker({
requestManager.useGetLastGlobalUpdateTimestamp(); requestManager.useGetLastGlobalUpdateTimestamp();
const lastUpdateTimestamp = lastUpdateTimestampData?.lastUpdateTimestamp.timestamp; const lastUpdateTimestamp = lastUpdateTimestampData?.lastUpdateTimestamp.timestamp;
const { data: updaterData } = requestManager.useGetGlobalUpdateSummary(); const { data: updaterData } = requestManager.useGetGlobalUpdateSummary();
const status = updaterData?.updateStatus; const status = updaterData?.libraryUpdateStatus;
const isRunning = !!status?.isRunning; const isRunning = !!status?.jobsInfo.isRunning;
const progress = useMemo( const progress = status ? (status.jobsInfo.finishedJobs / status.jobsInfo.totalJobs) * 100 : 0;
() => calcProgress(status),
[
status?.failedJobs.mangas.totalCount,
status?.completeJobs.mangas.totalCount,
status?.pendingJobs.mangas.totalCount,
status?.runningJobs.mangas.totalCount,
],
);
useEffect(() => { useEffect(() => {
if (!lastRunningState && status?.isRunning) { if (!lastRunningState && isRunning) {
lastRunningState = true; lastRunningState = true;
} }
@@ -85,7 +63,7 @@ export function UpdateChecker({
handleFinishedUpdate?.(); handleFinishedUpdate?.();
// this re-fetch is necessary since a running update could have been triggered by the server or another client // this re-fetch is necessary since a running update could have been triggered by the server or another client
reFetchLastTimestamp().catch(defaultPromiseErrorHandler('UpdateChecker::reFetchLastTimestamp')); reFetchLastTimestamp().catch(defaultPromiseErrorHandler('UpdateChecker::reFetchLastTimestamp'));
}, [status?.isRunning]); }, [isRunning]);
const startUpdate = async (category?: CategoryIdInfo['id']) => { const startUpdate = async (category?: CategoryIdInfo['id']) => {
try { try {

View File

@@ -27,7 +27,7 @@ function getTwoStateType(type: TwoStatePreferenceProps['twoStateType']) {
const getTwoStateValues = ( const getTwoStateValues = (
props: TwoStatePreferenceProps, props: TwoStatePreferenceProps,
): { ): {
title: string; title: string | null | undefined;
defaultValue: boolean; defaultValue: boolean;
currentValue?: boolean | null | undefined; currentValue?: boolean | null | undefined;
} => { } => {

View File

@@ -63,6 +63,7 @@ const fixTypingOfQueryTypePolicies = format(
\textensions?: FieldPolicy<any> | FieldReadFunction<any>, \textensions?: FieldPolicy<any> | FieldReadFunction<any>,
\tgetWebUIUpdateStatus?: FieldPolicy<any> | FieldReadFunction<any>, \tgetWebUIUpdateStatus?: FieldPolicy<any> | FieldReadFunction<any>,
\tlastUpdateTimestamp?: FieldPolicy<any> | FieldReadFunction<any>, \tlastUpdateTimestamp?: FieldPolicy<any> | FieldReadFunction<any>,
\tlibraryUpdateStatus?: FieldPolicy<any> | FieldReadFunction<any>,
\tmanga?: FieldPolicy<any> | FieldReadFunction<any>, \tmanga?: FieldPolicy<any> | FieldReadFunction<any>,
\tmangas?: FieldPolicy<any> | FieldReadFunction<any>, \tmangas?: FieldPolicy<any> | FieldReadFunction<any>,
\tmeta?: FieldPolicy<any> | FieldReadFunction<any>, \tmeta?: FieldPolicy<any> | FieldReadFunction<any>,
@@ -93,6 +94,7 @@ const fixTypingOfQueryTypePolicies = format(
\textensions?: FieldPolicy<any> | FieldReadFunction<any>, \textensions?: FieldPolicy<any> | FieldReadFunction<any>,
\tgetWebUIUpdateStatus?: FieldPolicy<Reference, Reference, Reference, FieldFunctionOptions<GetWebuiUpdateStatusQueryVariables>> | FieldReadFunction<Reference, Reference, FieldFunctionOptions<GetWebuiUpdateStatusQueryVariables>>, \tgetWebUIUpdateStatus?: FieldPolicy<Reference, Reference, Reference, FieldFunctionOptions<GetWebuiUpdateStatusQueryVariables>> | FieldReadFunction<Reference, Reference, FieldFunctionOptions<GetWebuiUpdateStatusQueryVariables>>,
\tlastUpdateTimestamp?: FieldPolicy<any> | FieldReadFunction<any>, \tlastUpdateTimestamp?: FieldPolicy<any> | FieldReadFunction<any>,
\tlibraryUpdateStatus?: FieldPolicy<Reference, Reference, Reference, FieldFunctionOptions<GetUpdateStatusQueryVariables>> | FieldReadFunction<Reference, Reference, FieldFunctionOptions<GetUpdateStatusQueryVariables>>,
\tmanga?: FieldPolicy<Reference, Reference, Reference, FieldFunctionOptions<GetMangaScreenQueryVariables>> | FieldReadFunction<Reference, Reference, FieldFunctionOptions<GetMangaScreenQueryVariables>>, \tmanga?: FieldPolicy<Reference, Reference, Reference, FieldFunctionOptions<GetMangaScreenQueryVariables>> | FieldReadFunction<Reference, Reference, FieldFunctionOptions<GetMangaScreenQueryVariables>>,
\tmangas?: FieldPolicy<any> | FieldReadFunction<any>, \tmangas?: FieldPolicy<any> | FieldReadFunction<any>,
\tmeta?: FieldPolicy<Reference, Reference, Reference, FieldFunctionOptions<GetGlobalMetadataQueryVariables>> | FieldReadFunction<Reference, Reference, FieldFunctionOptions<GetGlobalMetadataQueryVariables>>, \tmeta?: FieldPolicy<Reference, Reference, Reference, FieldFunctionOptions<GetGlobalMetadataQueryVariables>> | FieldReadFunction<Reference, Reference, FieldFunctionOptions<GetGlobalMetadataQueryVariables>>,
@@ -106,7 +108,7 @@ const fixTypingOfQueryTypePolicies = format(
\ttrackRecords?: FieldPolicy<any> | FieldReadFunction<any>, \ttrackRecords?: FieldPolicy<any> | FieldReadFunction<any>,
\ttracker?: FieldPolicy<any> | FieldReadFunction<any>, \ttracker?: FieldPolicy<any> | FieldReadFunction<any>,
\ttrackers?: FieldPolicy<any> | FieldReadFunction<any>, \ttrackers?: FieldPolicy<any> | FieldReadFunction<any>,
\tupdateStatus?: FieldPolicy<Reference, Reference, Reference, FieldFunctionOptions<GetUpdateStatusQueryVariables>> | FieldReadFunction<Reference, Reference, FieldFunctionOptions<GetUpdateStatusQueryVariables>>, \tupdateStatus?: FieldPolicy<any> | FieldReadFunction<any>,
\tvalidateBackup?: FieldPolicy<any> | FieldReadFunction<any> \tvalidateBackup?: FieldPolicy<any> | FieldReadFunction<any>
};`, };`,
); );

View File

@@ -1,6 +1,11 @@
[ [
{ {
"uiVersion": "PREVIEW", "uiVersion": "PREVIEW",
"serverVersion": "r1716"
},
{
"tag": "PREVIEW",
"uiVersion": "r2415",
"serverVersion": "r1636" "serverVersion": "r1636"
}, },
{ {