From 004fed9b2e3f2b48f82999ce21b3a393033b5bb8 Mon Sep 17 00:00:00 2001 From: lonelyhentxi Date: Sat, 5 Jul 2025 02:08:55 +0800 Subject: [PATCH] feat: init cron webui --- apps/proxy/.whistle/rules/properties | 2 +- apps/recorder/src/app/core.rs | 2 +- .../migrations/m20250629_065628_add_cron.rs | 25 +- apps/recorder/src/models/cron/core.rs | 1 + apps/recorder/src/models/cron/mod.rs | 23 +- apps/recorder/src/models/subscriptions/mod.rs | 10 + apps/recorder/src/task/service.rs | 217 +- apps/recorder/src/test_utils/app.rs | 4 +- apps/recorder/src/test_utils/task.rs | 5 +- apps/webui/src/app/config/nav.ts | 8 +- .../src/components/ui/container-header.tsx | 52 + .../webui/src/domains/recorder/schema/cron.ts | 58 + .../domains/recorder/schema/subscriptions.ts | 19 + apps/webui/src/infra/graphql/gql/gql.ts | 18 +- apps/webui/src/infra/graphql/gql/graphql.ts | 2529 +++++++++++++++-- apps/webui/src/infra/routes/utils.ts | 8 +- apps/webui/src/presentation/routeTree.gen.ts | 93 + .../routes/_app/credential3rd/create.tsx | 14 +- .../routes/_app/credential3rd/detail.$id.tsx | 50 +- .../routes/_app/credential3rd/edit.$id.tsx | 55 +- .../routes/_app/credential3rd/manage.tsx | 23 +- .../routes/_app/subscriptions/-sync.tsx | 1 + .../routes/_app/subscriptions/create.tsx | 14 +- .../routes/_app/subscriptions/detail.$id.tsx | 123 +- .../routes/_app/subscriptions/edit.$id.tsx | 45 +- .../routes/_app/subscriptions/manage.tsx | 21 +- .../routes/_app/tasks/cron/-status-badge.tsx | 42 + .../routes/_app/tasks/cron/detail.$id.tsx | 9 + .../routes/_app/tasks/cron/edit.$id.tsx | 9 + .../routes/_app/tasks/cron/manage.tsx | 306 ++ .../routes/_app/tasks/cron/route.tsx | 8 + .../routes/_app/tasks/detail.$id.tsx | 53 +- .../presentation/routes/_app/tasks/manage.tsx | 33 +- 33 files changed, 3329 insertions(+), 551 deletions(-) create mode 100644 apps/webui/src/components/ui/container-header.tsx create mode 100644 apps/webui/src/domains/recorder/schema/cron.ts create mode 100644 apps/webui/src/presentation/routes/_app/tasks/cron/-status-badge.tsx create mode 100644 apps/webui/src/presentation/routes/_app/tasks/cron/detail.$id.tsx create mode 100644 apps/webui/src/presentation/routes/_app/tasks/cron/edit.$id.tsx create mode 100644 apps/webui/src/presentation/routes/_app/tasks/cron/manage.tsx create mode 100644 apps/webui/src/presentation/routes/_app/tasks/cron/route.tsx diff --git a/apps/proxy/.whistle/rules/properties b/apps/proxy/.whistle/rules/properties index 9e2dd17..0d7e9f9 100644 --- a/apps/proxy/.whistle/rules/properties +++ b/apps/proxy/.whistle/rules/properties @@ -1 +1 @@ -{"filesOrder":["konobangu","konobangu-prod","mikan-doppel"],"selectedList":["mikan-doppel","konobangu-prod"],"disabledDefalutRules":true,"defalutRules":""} +{"filesOrder":["konobangu","konobangu-prod","mikan-doppel"],"selectedList":["mikan-doppel","konobangu"],"disabledDefalutRules":true,"defalutRules":""} diff --git a/apps/recorder/src/app/core.rs b/apps/recorder/src/app/core.rs index d1a96a9..3c71329 100644 --- a/apps/recorder/src/app/core.rs +++ b/apps/recorder/src/app/core.rs @@ -107,7 +107,7 @@ impl App { Ok::<(), RecorderError>(()) }, async { - task.run(if graceful_shutdown { + task.run_with_signal(if graceful_shutdown { Some(Self::shutdown_signal) } else { None diff --git a/apps/recorder/src/migrations/m20250629_065628_add_cron.rs b/apps/recorder/src/migrations/m20250629_065628_add_cron.rs index 5c8b04f..98eae15 100644 --- a/apps/recorder/src/migrations/m20250629_065628_add_cron.rs +++ b/apps/recorder/src/migrations/m20250629_065628_add_cron.rs @@ -8,9 +8,10 @@ use crate::{ Subscriptions, table_auto_z, }, models::cron::{ - CHECK_AND_TRIGGER_DUE_CRONS_FUNCTION_NAME, CRON_DUE_EVENT, CronStatus, CronStatusEnum, - NOTIFY_DUE_CRON_WHEN_MUTATING_FUNCTION_NAME, NOTIFY_DUE_CRON_WHEN_MUTATING_TRIGGER_NAME, - SETUP_CRON_EXTRA_FOREIGN_KEYS_FUNCTION_NAME, SETUP_CRON_EXTRA_FOREIGN_KEYS_TRIGGER_NAME, + CHECK_AND_TRIGGER_DUE_CRONS_FUNCTION_NAME, CRON_DUE_DEBUG_EVENT, CRON_DUE_EVENT, + CronStatus, CronStatusEnum, NOTIFY_DUE_CRON_WHEN_MUTATING_FUNCTION_NAME, + NOTIFY_DUE_CRON_WHEN_MUTATING_TRIGGER_NAME, SETUP_CRON_EXTRA_FOREIGN_KEYS_FUNCTION_NAME, + SETUP_CRON_EXTRA_FOREIGN_KEYS_TRIGGER_NAME, }, task::{ SETUP_APALIS_JOBS_EXTRA_FOREIGN_KEYS_FUNCTION_NAME, SUBSCRIBER_TASK_APALIS_NAME, @@ -48,14 +49,13 @@ impl MigrationTrait for Migration { .col(string_null(Cron::LockedBy)) .col(timestamp_with_time_zone_null(Cron::LockedAt)) .col(integer_null(Cron::TimeoutMs)) - .col(integer(Cron::Attempts)) - .col(integer(Cron::MaxAttempts)) - .col(integer(Cron::Priority)) - .col(enumeration( - Cron::Status, - CronStatusEnum, - CronStatus::iden_values(), - )) + .col(integer(Cron::Attempts).default(0)) + .col(integer(Cron::MaxAttempts).default(1)) + .col(integer(Cron::Priority).default(0)) + .col( + enumeration(Cron::Status, CronStatusEnum, CronStatus::iden_values()) + .default(CronStatus::Pending), + ) .col(json_binary_null(Cron::SubscriberTaskCron)) .col(json_binary_null(Cron::SystemTaskCron)) .foreign_key( @@ -207,9 +207,12 @@ impl MigrationTrait for Migration { ORDER BY {priority} ASC, {next_run} ASC FOR UPDATE SKIP LOCKED LOOP + -- PERFORM pg_notify('{CRON_DUE_DEBUG_EVENT}',format('Found due cron: value=%s; Now time: %s', row_to_json(cron_record)::text, CURRENT_TIMESTAMP)); PERFORM pg_notify('{CRON_DUE_EVENT}', row_to_json(cron_record)::text); notification_count := notification_count + 1; END LOOP; + + -- PERFORM pg_notify('{CRON_DUE_DEBUG_EVENT}', format('Notification count: %I; Now time: %s', notification_count, CURRENT_TIMESTAMP)); RETURN notification_count; END; $$ LANGUAGE plpgsql;"#, diff --git a/apps/recorder/src/models/cron/core.rs b/apps/recorder/src/models/cron/core.rs index 5af92fe..1afaf80 100644 --- a/apps/recorder/src/models/cron/core.rs +++ b/apps/recorder/src/models/cron/core.rs @@ -1,4 +1,5 @@ pub const CRON_DUE_EVENT: &str = "cron_due"; +pub const CRON_DUE_DEBUG_EVENT: &str = "cron_due_debug"; pub const CHECK_AND_TRIGGER_DUE_CRONS_FUNCTION_NAME: &str = "check_and_trigger_due_crons"; diff --git a/apps/recorder/src/models/cron/mod.rs b/apps/recorder/src/models/cron/mod.rs index cb721da..51921ad 100644 --- a/apps/recorder/src/models/cron/mod.rs +++ b/apps/recorder/src/models/cron/mod.rs @@ -1,7 +1,7 @@ mod core; pub use core::{ - CHECK_AND_TRIGGER_DUE_CRONS_FUNCTION_NAME, CRON_DUE_EVENT, + CHECK_AND_TRIGGER_DUE_CRONS_FUNCTION_NAME, CRON_DUE_DEBUG_EVENT, CRON_DUE_EVENT, NOTIFY_DUE_CRON_WHEN_MUTATING_FUNCTION_NAME, NOTIFY_DUE_CRON_WHEN_MUTATING_TRIGGER_NAME, SETUP_CRON_EXTRA_FOREIGN_KEYS_FUNCTION_NAME, SETUP_CRON_EXTRA_FOREIGN_KEYS_TRIGGER_NAME, }; @@ -59,8 +59,8 @@ pub struct Model { pub last_error: Option, pub locked_by: Option, pub locked_at: Option, - #[sea_orm(default_expr = "5000")] - pub timeout_ms: i32, + // default_expr = "5000" + pub timeout_ms: Option, #[sea_orm(default_expr = "0")] pub attempts: i32, #[sea_orm(default_expr = "1")] @@ -223,7 +223,10 @@ impl Model { && cron.attempts < cron.max_attempts && cron.status == CronStatus::Pending && (cron.locked_at.is_none_or(|locked_at| { - locked_at + chrono::Duration::milliseconds(cron.timeout_ms as i64) <= Utc::now() + cron.timeout_ms.is_some_and(|cron_timeout_ms| { + locked_at + chrono::Duration::milliseconds(cron_timeout_ms as i64) + <= Utc::now() + }) })) && cron.next_run.is_some_and(|next_run| next_run <= Utc::now()) { @@ -376,7 +379,15 @@ impl Model { locked_cron .mark_cron_failed( ctx, - format!("Cron timeout of {}ms", locked_cron.timeout_ms).as_str(), + format!( + "Cron timeout of {}ms", + locked_cron + .timeout_ms + .as_ref() + .map(|s| s.to_string()) + .unwrap_or_else(|| "Infinite".to_string()) + ) + .as_str(), retry_duration, ) .await?; @@ -389,7 +400,7 @@ impl Model { } pub fn calculate_next_run(cron_expr: &str) -> RecorderResult> { - let cron_expr = Cron::new(cron_expr).parse()?; + let cron_expr = Cron::new(cron_expr).with_seconds_optional().parse()?; let next = cron_expr.find_next_occurrence(&Utc::now(), false)?; diff --git a/apps/recorder/src/models/subscriptions/mod.rs b/apps/recorder/src/models/subscriptions/mod.rs index 53f7b99..bfc5960 100644 --- a/apps/recorder/src/models/subscriptions/mod.rs +++ b/apps/recorder/src/models/subscriptions/mod.rs @@ -60,6 +60,8 @@ pub enum Relation { Feed, #[sea_orm(has_many = "super::subscriber_tasks::Entity")] SubscriberTask, + #[sea_orm(has_many = "super::cron::Entity")] + Cron, } impl Related for Entity { @@ -126,6 +128,12 @@ impl Related for Entity { } } +impl Related for Entity { + fn to() -> RelationDef { + Relation::Cron.def() + } +} + #[derive(Copy, Clone, Debug, EnumIter, DeriveRelatedEntity)] pub enum RelatedEntity { #[sea_orm(entity = "super::subscribers::Entity")] @@ -144,6 +152,8 @@ pub enum RelatedEntity { Feed, #[sea_orm(entity = "super::subscriber_tasks::Entity")] SubscriberTask, + #[sea_orm(entity = "super::cron::Entity")] + Cron, } #[async_trait] diff --git a/apps/recorder/src/task/service.rs b/apps/recorder/src/task/service.rs index 580dbe3..4a156d0 100644 --- a/apps/recorder/src/task/service.rs +++ b/apps/recorder/src/task/service.rs @@ -13,7 +13,7 @@ use uuid::Uuid; use crate::{ app::AppContextTrait, errors::{RecorderError, RecorderResult}, - models::cron::{self, CRON_DUE_EVENT}, + models::cron::{self, CRON_DUE_DEBUG_EVENT, CRON_DUE_EVENT}, task::{ AsyncTaskTrait, SUBSCRIBER_TASK_APALIS_NAME, SYSTEM_TASK_APALIS_NAME, SubscriberTask, TaskConfig, @@ -152,86 +152,95 @@ impl TaskService { Ok(m) } - pub async fn run(&self, shutdown_signal: Option) -> RecorderResult<()> + pub async fn run(&self) -> RecorderResult<()> { + self.run_with_signal(None:: std::future::Ready<()>>) + .await + } + + pub async fn run_with_signal(&self, shutdown_signal: Option) -> RecorderResult<()> where - F: Fn() -> Fut + Send + 'static, + F: FnOnce() -> Fut + Send + 'static, Fut: Future + Send, { - tokio::try_join!( - async { + tokio::select! { + _ = { let monitor = self.setup_apalis_monitor().await?; - if let Some(shutdown_signal) = shutdown_signal { - monitor - .run_with_signal(async move { - shutdown_signal().await; - tracing::info!("apalis shutting down..."); - Ok(()) - }) - .await?; - } else { - monitor.run().await?; + async move { + if let Some(shutdown_signal) = shutdown_signal { + monitor + .run_with_signal(async move { + shutdown_signal().await; + tracing::info!("apalis shutting down..."); + Ok(()) + }) + .await?; + } else { + monitor.run().await?; + } + Ok::<_, RecorderError>(()) } - Ok::<_, RecorderError>(()) - }, - async { + } => {} + _ = { let listener = self.setup_apalis_listener().await?; - tokio::task::spawn(async move { + async move { if let Err(e) = listener.listen().await { tracing::error!("Error listening to apalis: {e}"); } - }); - Ok::<_, RecorderError>(()) - }, - async { + Ok::<_, RecorderError>(()) + } + } => {}, + _ = { let mut listener = self.setup_cron_due_listening().await?; let cron_worker_id = self.cron_worker_id.clone(); - let retry_duration = chrono::Duration::milliseconds( - self.config.cron_retry_duration.as_millis() as i64, - ); + let retry_duration = + chrono::Duration::milliseconds(self.config.cron_retry_duration.as_millis() as i64); let cron_interval_duration = self.config.cron_interval_duration; - listener.listen(CRON_DUE_EVENT).await?; - tracing::debug!("Listening for cron due event..."); + async move { + listener.listen_all([CRON_DUE_EVENT as &str, CRON_DUE_DEBUG_EVENT as &str]).await?; - tokio::task::spawn({ - let ctx = self.ctx.clone(); - async move { - if let Err(e) = - Self::listen_cron_due(listener, ctx, &cron_worker_id, retry_duration) - .await + tokio::join!( { - tracing::error!("Error listening to cron due: {e}"); - } - } - }); - - tokio::task::spawn({ - let ctx = self.ctx.clone(); - async move { - let mut interval = tokio::time::interval(cron_interval_duration); - loop { - interval.tick().await; - if let Err(e) = cron::Model::check_and_cleanup_expired_cron_locks( - ctx.as_ref(), - retry_duration, - ) - .await - { - tracing::error!( - "Error checking and cleaning up expired cron locks: {e}" - ); + let ctx = self.ctx.clone(); + async move { + if let Err(e) = + Self::listen_cron_due(listener, ctx, &cron_worker_id, retry_duration) + .await + { + tracing::error!("Error listening to cron due: {e}"); + } } - if let Err(e) = - cron::Model::check_and_trigger_due_crons(ctx.as_ref()).await - { - tracing::error!("Error checking and triggering due crons: {e}"); + }, + { + let ctx = self.ctx.clone(); + let mut interval = tokio::time::interval(cron_interval_duration); + async move { + loop { + interval.tick().await; + if let Err(e) = cron::Model::check_and_cleanup_expired_cron_locks( + ctx.as_ref(), + retry_duration, + ) + .await + { + tracing::error!( + "Error checking and cleaning up expired cron locks: {e}" + ); + } + + if let Err(e) = + cron::Model::check_and_trigger_due_crons(ctx.as_ref()).await + { + tracing::error!("Error checking and triggering due crons: {e}"); + } + } } } - } - }); + ); + Ok::<_, RecorderError>(()) + } + } => {} + }; - Ok::<_, RecorderError>(()) - } - )?; Ok(()) } @@ -299,14 +308,17 @@ impl TaskService { ) -> RecorderResult<()> { loop { let notification = listener.recv().await?; - tracing::debug!("Received cron due event: {:?}", notification); - if let Err(e) = cron::Model::handle_cron_notification( - ctx.as_ref(), - notification, - worker_id, - retry_duration, - ) - .await + if notification.channel() == CRON_DUE_DEBUG_EVENT { + tracing::debug!("Received cron due debug event: {:?}", notification); + continue; + } else if notification.channel() == CRON_DUE_EVENT + && let Err(e) = cron::Model::handle_cron_notification( + ctx.as_ref(), + notification, + worker_id, + retry_duration, + ) + .await { tracing::error!("Error handling cron notification: {e}"); } @@ -319,6 +331,7 @@ impl TaskService { mod tests { use std::time::Duration; + use chrono::Utc; use rstest::{fixture, rstest}; use sea_orm::ActiveValue; use tracing::Level; @@ -340,12 +353,14 @@ mod tests { #[rstest] #[tokio::test] - // #[tracing_test::traced_test] - async fn test_cron_due_listening(before_each: ()) -> RecorderResult<()> { + #[tracing_test::traced_test] + async fn test_check_and_trigger_due_crons_with_certain_interval( + before_each: (), + ) -> RecorderResult<()> { let preset = TestingPreset::default_with_config( TestingAppContextConfig::builder() .task_config(TaskConfig { - cron_interval_duration: Duration::from_secs(1), + cron_interval_duration: Duration::from_millis(1500), ..Default::default() }) .build(), @@ -364,15 +379,53 @@ mod tests { ..Default::default() }; - let _ = task_service - .run(Some(async move || { - tokio::time::sleep(std::time::Duration::from_secs(5)).await; - })) - .await; + task_service.add_system_task_cron(echo_cron).await?; - // assert!(logs_contain(&format!( - // "EchoTask {task_id} start running at" - // ))); + task_service + .run_with_signal(Some(async move || { + tokio::time::sleep(std::time::Duration::from_secs(2)).await; + })) + .await?; + + assert!(logs_contain(&format!( + "EchoTask {task_id} start running at" + ))); + + Ok(()) + } + + #[rstest] + #[tokio::test] + #[tracing_test::traced_test] + async fn test_trigger_due_cron_when_mutating(before_each: ()) -> RecorderResult<()> { + let preset = TestingPreset::default().await?; + let app_ctx = preset.app_ctx; + let task_service = app_ctx.task(); + + let task_id = Uuid::now_v7().to_string(); + + let echo_cron = cron::ActiveModel { + cron_expr: ActiveValue::Set("* * * */1 * *".to_string()), + next_run: ActiveValue::Set(Some(Utc::now() + chrono::Duration::seconds(-10))), + system_task_cron: ActiveValue::Set(Some( + EchoTask::builder().task_id(task_id.clone()).build().into(), + )), + ..Default::default() + }; + + let task_runner = task_service.run_with_signal(Some(async move || { + tokio::time::sleep(std::time::Duration::from_millis(500)).await; + })); + + tokio::time::sleep(std::time::Duration::from_millis(100)).await; + + task_service.add_system_task_cron(echo_cron).await?; + + task_runner.await?; + + assert!(logs_contain(&format!( + "EchoTask {task_id} start running at" + ))); Ok(()) } diff --git a/apps/recorder/src/test_utils/app.rs b/apps/recorder/src/test_utils/app.rs index 38c5439..731725e 100644 --- a/apps/recorder/src/test_utils/app.rs +++ b/apps/recorder/src/test_utils/app.rs @@ -62,7 +62,7 @@ impl TestingAppContext { .build(), ); - let task_service = build_testing_task_service(app_ctx.clone()).await?; + let task_service = build_testing_task_service(config.task_config, app_ctx.clone()).await?; app_ctx.set_task(task_service); @@ -134,7 +134,7 @@ impl AppContextTrait for TestingAppContext { } } -#[derive(TypedBuilder)] +#[derive(TypedBuilder, Debug)] #[builder(field_defaults(default, setter(strip_option)))] pub struct TestingAppContextConfig { pub mikan_base_url: Option, diff --git a/apps/recorder/src/test_utils/task.rs b/apps/recorder/src/test_utils/task.rs index b79ec66..7749af6 100644 --- a/apps/recorder/src/test_utils/task.rs +++ b/apps/recorder/src/test_utils/task.rs @@ -7,11 +7,10 @@ use crate::{ }; pub async fn build_testing_task_service( + config: Option, ctx: Arc, ) -> RecorderResult { - let config = TaskConfig { - ..Default::default() - }; + let config = config.unwrap_or_default(); let task_service = TaskService::from_config_and_ctx(config, ctx).await?; Ok(task_service) diff --git a/apps/webui/src/app/config/nav.ts b/apps/webui/src/app/config/nav.ts index 9d19e0e..3730452 100644 --- a/apps/webui/src/app/config/nav.ts +++ b/apps/webui/src/app/config/nav.ts @@ -65,11 +65,17 @@ export const AppNavMainData: NavMainGroup[] = [ icon: ListTodo, children: [ { - title: 'Manage', + title: 'Tasks', link: { to: '/tasks/manage', }, }, + { + title: 'Crons', + link: { + to: '/tasks/cron/manage', + }, + }, ], }, { diff --git a/apps/webui/src/components/ui/container-header.tsx b/apps/webui/src/components/ui/container-header.tsx new file mode 100644 index 0000000..78cfa7f --- /dev/null +++ b/apps/webui/src/components/ui/container-header.tsx @@ -0,0 +1,52 @@ +import { useCanGoBack, useNavigate, useRouter } from "@tanstack/react-router"; +import { ArrowLeft } from "lucide-react"; +import { type ReactNode, memo } from "react"; +import { Button } from "./button"; + +export interface ContainerHeaderProps { + title: string; + description: string; + defaultBackTo?: string; + actions?: ReactNode; +} + +export const ContainerHeader = memo( + ({ title, description, defaultBackTo, actions }: ContainerHeaderProps) => { + const navigate = useNavigate(); + const router = useRouter(); + const canGoBack = useCanGoBack(); + + const finalCanGoBack = canGoBack || !!defaultBackTo; + + const handleBack = () => { + if (canGoBack) { + router.history.back(); + } else { + navigate({ to: defaultBackTo }); + } + }; + + return ( +
+
+ {finalCanGoBack && ( + + )} +
+

{title}

+

{description}

+
+
+ +
{actions}
+
+ ); + } +); diff --git a/apps/webui/src/domains/recorder/schema/cron.ts b/apps/webui/src/domains/recorder/schema/cron.ts new file mode 100644 index 0000000..ec597da --- /dev/null +++ b/apps/webui/src/domains/recorder/schema/cron.ts @@ -0,0 +1,58 @@ +import type { GetCronsQuery } from '@/infra/graphql/gql/graphql'; +import { gql } from '@apollo/client'; + +export const GET_CRONS = gql` +query GetCrons($filter: CronFilterInput!, $orderBy: CronOrderInput!, $pagination: PaginationInput!) { + cron(pagination: $pagination, filter: $filter, orderBy: $orderBy) { + nodes { + id + cronExpr + nextRun + lastRun + lastError + status + lockedAt + lockedBy + createdAt + updatedAt + timeoutMs + maxAttempts + priority + attempts + subscriberTaskCron + subscriberTask { + nodes { + id, + job, + taskType, + status, + attempts, + maxAttempts, + runAt, + lastError, + lockAt, + lockBy, + doneAt, + priority, + subscription { + displayName + sourceUrl + } + } + } + } + paginationInfo { + total + pages + } + } + } +`; + +export type CronDto = GetCronsQuery['cron']['nodes'][number]; + +export const DELETE_CRONS = gql` + mutation DeleteCrons($filter: CronFilterInput!) { + cronDelete(filter: $filter) + } +`; diff --git a/apps/webui/src/domains/recorder/schema/subscriptions.ts b/apps/webui/src/domains/recorder/schema/subscriptions.ts index c9494a2..0a735b8 100644 --- a/apps/webui/src/domains/recorder/schema/subscriptions.ts +++ b/apps/webui/src/domains/recorder/schema/subscriptions.ts @@ -117,6 +117,25 @@ query GetSubscriptionDetail ($id: Int!) { id username } + cron { + nodes { + id + cronExpr + nextRun + lastRun + lastError + status + lockedAt + lockedBy + createdAt + updatedAt + timeoutMs + maxAttempts + priority + attempts + subscriberTaskCron + } + } bangumi { nodes { createdAt diff --git a/apps/webui/src/infra/graphql/gql/gql.ts b/apps/webui/src/infra/graphql/gql/gql.ts index dd50b60..ba247f5 100644 --- a/apps/webui/src/infra/graphql/gql/gql.ts +++ b/apps/webui/src/infra/graphql/gql/gql.ts @@ -20,13 +20,15 @@ type Documents = { "\n mutation DeleteCredential3rd($filter: Credential3rdFilterInput!) {\n credential3rdDelete(filter: $filter)\n }\n": typeof types.DeleteCredential3rdDocument, "\n query GetCredential3rdDetail($id: Int!) {\n credential3rd(filter: { id: { eq: $id } }) {\n nodes {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n }\n }\n": typeof types.GetCredential3rdDetailDocument, "\n mutation CheckCredential3rdAvailable($filter: Credential3rdFilterInput!) {\n credential3rdCheckAvailable(filter: $filter) {\n available\n }\n }\n": typeof types.CheckCredential3rdAvailableDocument, + "\nquery GetCrons($filter: CronFilterInput!, $orderBy: CronOrderInput!, $pagination: PaginationInput!) {\n cron(pagination: $pagination, filter: $filter, orderBy: $orderBy) {\n nodes {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n subscriberTaskCron\n subscriberTask {\n nodes {\n id,\n job,\n taskType,\n status,\n attempts,\n maxAttempts,\n runAt,\n lastError,\n lockAt,\n lockBy,\n doneAt,\n priority,\n subscription {\n displayName\n sourceUrl\n }\n }\n }\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n": typeof types.GetCronsDocument, + "\n mutation DeleteCrons($filter: CronFilterInput!) {\n cronDelete(filter: $filter)\n }\n": typeof types.DeleteCronsDocument, "\n mutation InsertFeed($data: FeedsInsertInput!) {\n feedsCreateOne(data: $data) {\n id\n createdAt\n updatedAt\n feedType\n token\n }\n }\n": typeof types.InsertFeedDocument, "\n mutation DeleteFeed($filter: FeedsFilterInput!) {\n feedsDelete(filter: $filter)\n }\n": typeof types.DeleteFeedDocument, "\n query GetSubscriptions($filter: SubscriptionsFilterInput!, $orderBy: SubscriptionsOrderInput!, $pagination: PaginationInput!) {\n subscriptions(\n pagination: $pagination\n filter: $filter\n orderBy: $orderBy\n ) {\n nodes {\n id\n createdAt\n updatedAt\n displayName\n category\n sourceUrl\n enabled\n credentialId\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n": typeof types.GetSubscriptionsDocument, "\n mutation InsertSubscription($data: SubscriptionsInsertInput!) {\n subscriptionsCreateOne(data: $data) {\n id\n createdAt\n updatedAt\n displayName\n category\n sourceUrl\n enabled\n credentialId\n }\n }\n": typeof types.InsertSubscriptionDocument, "\n mutation UpdateSubscriptions(\n $data: SubscriptionsUpdateInput!,\n $filter: SubscriptionsFilterInput!,\n ) {\n subscriptionsUpdate (\n data: $data\n filter: $filter\n ) {\n id\n createdAt\n updatedAt\n displayName\n category\n sourceUrl\n enabled\n }\n}\n": typeof types.UpdateSubscriptionsDocument, "\n mutation DeleteSubscriptions($filter: SubscriptionsFilterInput) {\n subscriptionsDelete(filter: $filter)\n }\n": typeof types.DeleteSubscriptionsDocument, - "\nquery GetSubscriptionDetail ($id: Int!) {\n subscriptions(filter: { id: {\n eq: $id\n } }) {\n nodes {\n id\n subscriberId\n displayName\n createdAt\n updatedAt\n category\n sourceUrl\n enabled\n feed {\n nodes {\n id\n createdAt\n updatedAt\n token\n feedType\n feedSource\n }\n }\n subscriberTask {\n nodes {\n id\n taskType\n status\n }\n }\n credential3rd {\n id\n username\n }\n bangumi {\n nodes {\n createdAt\n updatedAt\n id\n mikanBangumiId\n displayName\n season\n seasonRaw\n fansub\n mikanFansubId\n rssLink\n posterLink\n homepage\n }\n }\n }\n }\n}\n": typeof types.GetSubscriptionDetailDocument, + "\nquery GetSubscriptionDetail ($id: Int!) {\n subscriptions(filter: { id: {\n eq: $id\n } }) {\n nodes {\n id\n subscriberId\n displayName\n createdAt\n updatedAt\n category\n sourceUrl\n enabled\n feed {\n nodes {\n id\n createdAt\n updatedAt\n token\n feedType\n feedSource\n }\n }\n subscriberTask {\n nodes {\n id\n taskType\n status\n }\n }\n credential3rd {\n id\n username\n }\n cron {\n nodes {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n subscriberTaskCron\n }\n }\n bangumi {\n nodes {\n createdAt\n updatedAt\n id\n mikanBangumiId\n displayName\n season\n seasonRaw\n fansub\n mikanFansubId\n rssLink\n posterLink\n homepage\n }\n }\n }\n }\n}\n": typeof types.GetSubscriptionDetailDocument, "\n query GetTasks($filter: SubscriberTasksFilterInput!, $orderBy: SubscriberTasksOrderInput!, $pagination: PaginationInput!) {\n subscriberTasks(\n pagination: $pagination\n filter: $filter\n orderBy: $orderBy\n ) {\n nodes {\n id,\n job,\n taskType,\n status,\n attempts,\n maxAttempts,\n runAt,\n lastError,\n lockAt,\n lockBy,\n doneAt,\n priority,\n subscription {\n displayName\n sourceUrl\n }\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n": typeof types.GetTasksDocument, "\n mutation InsertSubscriberTask($data: SubscriberTasksInsertInput!) {\n subscriberTasksCreateOne(data: $data) {\n id\n }\n }\n": typeof types.InsertSubscriberTaskDocument, "\n mutation DeleteTasks($filter: SubscriberTasksFilterInput!) {\n subscriberTasksDelete(filter: $filter)\n }\n": typeof types.DeleteTasksDocument, @@ -39,13 +41,15 @@ const documents: Documents = { "\n mutation DeleteCredential3rd($filter: Credential3rdFilterInput!) {\n credential3rdDelete(filter: $filter)\n }\n": types.DeleteCredential3rdDocument, "\n query GetCredential3rdDetail($id: Int!) {\n credential3rd(filter: { id: { eq: $id } }) {\n nodes {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n }\n }\n": types.GetCredential3rdDetailDocument, "\n mutation CheckCredential3rdAvailable($filter: Credential3rdFilterInput!) {\n credential3rdCheckAvailable(filter: $filter) {\n available\n }\n }\n": types.CheckCredential3rdAvailableDocument, + "\nquery GetCrons($filter: CronFilterInput!, $orderBy: CronOrderInput!, $pagination: PaginationInput!) {\n cron(pagination: $pagination, filter: $filter, orderBy: $orderBy) {\n nodes {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n subscriberTaskCron\n subscriberTask {\n nodes {\n id,\n job,\n taskType,\n status,\n attempts,\n maxAttempts,\n runAt,\n lastError,\n lockAt,\n lockBy,\n doneAt,\n priority,\n subscription {\n displayName\n sourceUrl\n }\n }\n }\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n": types.GetCronsDocument, + "\n mutation DeleteCrons($filter: CronFilterInput!) {\n cronDelete(filter: $filter)\n }\n": types.DeleteCronsDocument, "\n mutation InsertFeed($data: FeedsInsertInput!) {\n feedsCreateOne(data: $data) {\n id\n createdAt\n updatedAt\n feedType\n token\n }\n }\n": types.InsertFeedDocument, "\n mutation DeleteFeed($filter: FeedsFilterInput!) {\n feedsDelete(filter: $filter)\n }\n": types.DeleteFeedDocument, "\n query GetSubscriptions($filter: SubscriptionsFilterInput!, $orderBy: SubscriptionsOrderInput!, $pagination: PaginationInput!) {\n subscriptions(\n pagination: $pagination\n filter: $filter\n orderBy: $orderBy\n ) {\n nodes {\n id\n createdAt\n updatedAt\n displayName\n category\n sourceUrl\n enabled\n credentialId\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n": types.GetSubscriptionsDocument, "\n mutation InsertSubscription($data: SubscriptionsInsertInput!) {\n subscriptionsCreateOne(data: $data) {\n id\n createdAt\n updatedAt\n displayName\n category\n sourceUrl\n enabled\n credentialId\n }\n }\n": types.InsertSubscriptionDocument, "\n mutation UpdateSubscriptions(\n $data: SubscriptionsUpdateInput!,\n $filter: SubscriptionsFilterInput!,\n ) {\n subscriptionsUpdate (\n data: $data\n filter: $filter\n ) {\n id\n createdAt\n updatedAt\n displayName\n category\n sourceUrl\n enabled\n }\n}\n": types.UpdateSubscriptionsDocument, "\n mutation DeleteSubscriptions($filter: SubscriptionsFilterInput) {\n subscriptionsDelete(filter: $filter)\n }\n": types.DeleteSubscriptionsDocument, - "\nquery GetSubscriptionDetail ($id: Int!) {\n subscriptions(filter: { id: {\n eq: $id\n } }) {\n nodes {\n id\n subscriberId\n displayName\n createdAt\n updatedAt\n category\n sourceUrl\n enabled\n feed {\n nodes {\n id\n createdAt\n updatedAt\n token\n feedType\n feedSource\n }\n }\n subscriberTask {\n nodes {\n id\n taskType\n status\n }\n }\n credential3rd {\n id\n username\n }\n bangumi {\n nodes {\n createdAt\n updatedAt\n id\n mikanBangumiId\n displayName\n season\n seasonRaw\n fansub\n mikanFansubId\n rssLink\n posterLink\n homepage\n }\n }\n }\n }\n}\n": types.GetSubscriptionDetailDocument, + "\nquery GetSubscriptionDetail ($id: Int!) {\n subscriptions(filter: { id: {\n eq: $id\n } }) {\n nodes {\n id\n subscriberId\n displayName\n createdAt\n updatedAt\n category\n sourceUrl\n enabled\n feed {\n nodes {\n id\n createdAt\n updatedAt\n token\n feedType\n feedSource\n }\n }\n subscriberTask {\n nodes {\n id\n taskType\n status\n }\n }\n credential3rd {\n id\n username\n }\n cron {\n nodes {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n subscriberTaskCron\n }\n }\n bangumi {\n nodes {\n createdAt\n updatedAt\n id\n mikanBangumiId\n displayName\n season\n seasonRaw\n fansub\n mikanFansubId\n rssLink\n posterLink\n homepage\n }\n }\n }\n }\n}\n": types.GetSubscriptionDetailDocument, "\n query GetTasks($filter: SubscriberTasksFilterInput!, $orderBy: SubscriberTasksOrderInput!, $pagination: PaginationInput!) {\n subscriberTasks(\n pagination: $pagination\n filter: $filter\n orderBy: $orderBy\n ) {\n nodes {\n id,\n job,\n taskType,\n status,\n attempts,\n maxAttempts,\n runAt,\n lastError,\n lockAt,\n lockBy,\n doneAt,\n priority,\n subscription {\n displayName\n sourceUrl\n }\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n": types.GetTasksDocument, "\n mutation InsertSubscriberTask($data: SubscriberTasksInsertInput!) {\n subscriberTasksCreateOne(data: $data) {\n id\n }\n }\n": types.InsertSubscriberTaskDocument, "\n mutation DeleteTasks($filter: SubscriberTasksFilterInput!) {\n subscriberTasksDelete(filter: $filter)\n }\n": types.DeleteTasksDocument, @@ -90,6 +94,14 @@ export function gql(source: "\n query GetCredential3rdDetail($id: Int!) {\n * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function gql(source: "\n mutation CheckCredential3rdAvailable($filter: Credential3rdFilterInput!) {\n credential3rdCheckAvailable(filter: $filter) {\n available\n }\n }\n"): (typeof documents)["\n mutation CheckCredential3rdAvailable($filter: Credential3rdFilterInput!) {\n credential3rdCheckAvailable(filter: $filter) {\n available\n }\n }\n"]; +/** + * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function gql(source: "\nquery GetCrons($filter: CronFilterInput!, $orderBy: CronOrderInput!, $pagination: PaginationInput!) {\n cron(pagination: $pagination, filter: $filter, orderBy: $orderBy) {\n nodes {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n subscriberTaskCron\n subscriberTask {\n nodes {\n id,\n job,\n taskType,\n status,\n attempts,\n maxAttempts,\n runAt,\n lastError,\n lockAt,\n lockBy,\n doneAt,\n priority,\n subscription {\n displayName\n sourceUrl\n }\n }\n }\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n"): (typeof documents)["\nquery GetCrons($filter: CronFilterInput!, $orderBy: CronOrderInput!, $pagination: PaginationInput!) {\n cron(pagination: $pagination, filter: $filter, orderBy: $orderBy) {\n nodes {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n subscriberTaskCron\n subscriberTask {\n nodes {\n id,\n job,\n taskType,\n status,\n attempts,\n maxAttempts,\n runAt,\n lastError,\n lockAt,\n lockBy,\n doneAt,\n priority,\n subscription {\n displayName\n sourceUrl\n }\n }\n }\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n"]; +/** + * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function gql(source: "\n mutation DeleteCrons($filter: CronFilterInput!) {\n cronDelete(filter: $filter)\n }\n"): (typeof documents)["\n mutation DeleteCrons($filter: CronFilterInput!) {\n cronDelete(filter: $filter)\n }\n"]; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -117,7 +129,7 @@ export function gql(source: "\n mutation DeleteSubscriptions($filter: Subscri /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function gql(source: "\nquery GetSubscriptionDetail ($id: Int!) {\n subscriptions(filter: { id: {\n eq: $id\n } }) {\n nodes {\n id\n subscriberId\n displayName\n createdAt\n updatedAt\n category\n sourceUrl\n enabled\n feed {\n nodes {\n id\n createdAt\n updatedAt\n token\n feedType\n feedSource\n }\n }\n subscriberTask {\n nodes {\n id\n taskType\n status\n }\n }\n credential3rd {\n id\n username\n }\n bangumi {\n nodes {\n createdAt\n updatedAt\n id\n mikanBangumiId\n displayName\n season\n seasonRaw\n fansub\n mikanFansubId\n rssLink\n posterLink\n homepage\n }\n }\n }\n }\n}\n"): (typeof documents)["\nquery GetSubscriptionDetail ($id: Int!) {\n subscriptions(filter: { id: {\n eq: $id\n } }) {\n nodes {\n id\n subscriberId\n displayName\n createdAt\n updatedAt\n category\n sourceUrl\n enabled\n feed {\n nodes {\n id\n createdAt\n updatedAt\n token\n feedType\n feedSource\n }\n }\n subscriberTask {\n nodes {\n id\n taskType\n status\n }\n }\n credential3rd {\n id\n username\n }\n bangumi {\n nodes {\n createdAt\n updatedAt\n id\n mikanBangumiId\n displayName\n season\n seasonRaw\n fansub\n mikanFansubId\n rssLink\n posterLink\n homepage\n }\n }\n }\n }\n}\n"]; +export function gql(source: "\nquery GetSubscriptionDetail ($id: Int!) {\n subscriptions(filter: { id: {\n eq: $id\n } }) {\n nodes {\n id\n subscriberId\n displayName\n createdAt\n updatedAt\n category\n sourceUrl\n enabled\n feed {\n nodes {\n id\n createdAt\n updatedAt\n token\n feedType\n feedSource\n }\n }\n subscriberTask {\n nodes {\n id\n taskType\n status\n }\n }\n credential3rd {\n id\n username\n }\n cron {\n nodes {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n subscriberTaskCron\n }\n }\n bangumi {\n nodes {\n createdAt\n updatedAt\n id\n mikanBangumiId\n displayName\n season\n seasonRaw\n fansub\n mikanFansubId\n rssLink\n posterLink\n homepage\n }\n }\n }\n }\n}\n"): (typeof documents)["\nquery GetSubscriptionDetail ($id: Int!) {\n subscriptions(filter: { id: {\n eq: $id\n } }) {\n nodes {\n id\n subscriberId\n displayName\n createdAt\n updatedAt\n category\n sourceUrl\n enabled\n feed {\n nodes {\n id\n createdAt\n updatedAt\n token\n feedType\n feedSource\n }\n }\n subscriberTask {\n nodes {\n id\n taskType\n status\n }\n }\n credential3rd {\n id\n username\n }\n cron {\n nodes {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n subscriberTaskCron\n }\n }\n bangumi {\n nodes {\n createdAt\n updatedAt\n id\n mikanBangumiId\n displayName\n season\n seasonRaw\n fansub\n mikanFansubId\n rssLink\n posterLink\n homepage\n }\n }\n }\n }\n}\n"]; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/apps/webui/src/infra/graphql/gql/graphql.ts b/apps/webui/src/infra/graphql/gql/graphql.ts index 55d9cf7..c16c4c8 100644 --- a/apps/webui/src/infra/graphql/gql/graphql.ts +++ b/apps/webui/src/infra/graphql/gql/graphql.ts @@ -1,28 +1,44 @@ +import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; /* eslint-disable */ import { SubscriberTaskInput } from 'recorder/bindings/SubscriberTaskInput'; import { SubscriberTaskType } from 'recorder/bindings/SubscriberTaskType'; -import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; export type Maybe = T | null; export type InputMaybe = Maybe; -export type Exact = { [K in keyof T]: T[K] }; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; +export type Exact = { + [K in keyof T]: T[K]; +}; +export type MakeOptional = Omit & { + [SubKey in K]?: Maybe; +}; +export type MakeMaybe = Omit & { + [SubKey in K]: Maybe; +}; +export type MakeEmpty< + T extends { [key: string]: unknown }, + K extends keyof T, +> = { [_ in K]?: never }; +export type Incremental = + | T + | { + [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never; + }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } + ID: { input: string; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; /** The `JSON` scalar type represents raw JSON values */ - Json: { input: any; output: any; } - JsonbFilterInput: { input: any; output: any; } + Json: { input: any; output: any }; + JsonbFilterInput: { input: any; output: any }; /** type SubscriberTaskType = { "taskType": "sync_one_subscription_feeds_incremental" } & SyncOneSubscriptionFeedsIncrementalTask | { "taskType": "sync_one_subscription_feeds_full" } & SyncOneSubscriptionFeedsFullTask | { "taskType": "sync_one_subscription_sources" } & SyncOneSubscriptionSourcesTask; */ - SubscriberTaskType: { input: SubscriberTaskInput; output: SubscriberTaskType; } - /** type SystemTaskType = { "taskType": "optimize_image" } & OptimizeImageTask; */ - SystemTaskType: { input: any; output: any; } + SubscriberTaskType: { + input: SubscriberTaskInput; + output: SubscriberTaskType; + }; + /** type SystemTaskType = { "taskType": "optimize_image" } & OptimizeImageTask | { "taskType": "test" } & EchoTask; */ + SystemTaskType: { input: any; output: any }; }; export type Bangumi = { @@ -50,21 +66,18 @@ export type Bangumi = { updatedAt: Scalars['String']['output']; }; - export type BangumiEpisodeArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type BangumiSubscriptionArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type BangumiSubscriptionBangumiArgs = { filter?: InputMaybe; orderBy?: InputMaybe; @@ -168,10 +181,11 @@ export type BangumiOrderInput = { }; export const BangumiTypeEnum = { - Mikan: 'mikan' + Mikan: 'mikan', } as const; -export type BangumiTypeEnum = typeof BangumiTypeEnum[keyof typeof BangumiTypeEnum]; +export type BangumiTypeEnum = + (typeof BangumiTypeEnum)[keyof typeof BangumiTypeEnum]; export type BangumiTypeEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -232,7 +246,6 @@ export type Credential3rd = { username?: Maybe; }; - export type Credential3rdSubscriptionArgs = { filter?: InputMaybe; orderBy?: InputMaybe; @@ -311,10 +324,11 @@ export type Credential3rdOrderInput = { }; export const Credential3rdTypeEnum = { - Mikan: 'mikan' + Mikan: 'mikan', } as const; -export type Credential3rdTypeEnum = typeof Credential3rdTypeEnum[keyof typeof Credential3rdTypeEnum]; +export type Credential3rdTypeEnum = + (typeof Credential3rdTypeEnum)[keyof typeof Credential3rdTypeEnum]; export type Credential3rdTypeEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -362,18 +376,16 @@ export type Cron = { subscriptionId?: Maybe; systemTask: SystemTasksConnection; systemTaskCron?: Maybe; - timeoutMs: Scalars['Int']['output']; + timeoutMs?: Maybe; updatedAt: Scalars['String']['output']; }; - export type CronSubscriberTaskArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type CronSystemTaskArgs = { filter?: InputMaybe; orderBy?: InputMaybe; @@ -399,7 +411,7 @@ export type CronBasic = { subscriberTaskCron?: Maybe; subscriptionId?: Maybe; systemTaskCron?: Maybe; - timeoutMs: Scalars['Int']['output']; + timeoutMs?: Maybe; updatedAt: Scalars['String']['output']; }; @@ -476,10 +488,11 @@ export const CronStatusEnum = { Completed: 'completed', Failed: 'failed', Pending: 'pending', - Running: 'running' + Running: 'running', } as const; -export type CronStatusEnum = typeof CronStatusEnum[keyof typeof CronStatusEnum]; +export type CronStatusEnum = + (typeof CronStatusEnum)[keyof typeof CronStatusEnum]; export type CronStatusEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -508,10 +521,11 @@ export type CursorInput = { export const DownloadMimeEnum = { Applicationoctetstream: 'applicationoctetstream', - Applicationxbittorrent: 'applicationxbittorrent' + Applicationxbittorrent: 'applicationxbittorrent', } as const; -export type DownloadMimeEnum = typeof DownloadMimeEnum[keyof typeof DownloadMimeEnum]; +export type DownloadMimeEnum = + (typeof DownloadMimeEnum)[keyof typeof DownloadMimeEnum]; export type DownloadMimeEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -531,10 +545,11 @@ export const DownloadStatusEnum = { Downloading: 'downloading', Failed: 'failed', Paused: 'paused', - Pending: 'pending' + Pending: 'pending', } as const; -export type DownloadStatusEnum = typeof DownloadStatusEnum[keyof typeof DownloadStatusEnum]; +export type DownloadStatusEnum = + (typeof DownloadStatusEnum)[keyof typeof DownloadStatusEnum]; export type DownloadStatusEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -550,10 +565,11 @@ export type DownloadStatusEnumFilterInput = { export const DownloaderCategoryEnum = { Dandanplay: 'dandanplay', - Qbittorrent: 'qbittorrent' + Qbittorrent: 'qbittorrent', } as const; -export type DownloaderCategoryEnum = typeof DownloaderCategoryEnum[keyof typeof DownloaderCategoryEnum]; +export type DownloaderCategoryEnum = + (typeof DownloaderCategoryEnum)[keyof typeof DownloaderCategoryEnum]; export type DownloaderCategoryEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -582,7 +598,6 @@ export type Downloaders = { username: Scalars['String']['output']; }; - export type DownloadersDownloadArgs = { filter?: InputMaybe; orderBy?: InputMaybe; @@ -794,10 +809,11 @@ export type DownloadsUpdateInput = { }; export const EpisodeTypeEnum = { - Mikan: 'mikan' + Mikan: 'mikan', } as const; -export type EpisodeTypeEnum = typeof EpisodeTypeEnum[keyof typeof EpisodeTypeEnum]; +export type EpisodeTypeEnum = + (typeof EpisodeTypeEnum)[keyof typeof EpisodeTypeEnum]; export type EpisodeTypeEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -843,21 +859,18 @@ export type Episodes = { updatedAt: Scalars['String']['output']; }; - export type EpisodesDownloadArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type EpisodesSubscriptionArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type EpisodesSubscriptionEpisodeArgs = { filter?: InputMaybe; orderBy?: InputMaybe; @@ -1011,10 +1024,11 @@ export type EpisodesUpdateInput = { }; export const FeedSourceEnum = { - SubscriptionEpisode: 'subscription_episode' + SubscriptionEpisode: 'subscription_episode', } as const; -export type FeedSourceEnum = typeof FeedSourceEnum[keyof typeof FeedSourceEnum]; +export type FeedSourceEnum = + (typeof FeedSourceEnum)[keyof typeof FeedSourceEnum]; export type FeedSourceEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -1029,10 +1043,10 @@ export type FeedSourceEnumFilterInput = { }; export const FeedTypeEnum = { - Rss: 'rss' + Rss: 'rss', } as const; -export type FeedTypeEnum = typeof FeedTypeEnum[keyof typeof FeedTypeEnum]; +export type FeedTypeEnum = (typeof FeedTypeEnum)[keyof typeof FeedTypeEnum]; export type FeedTypeEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -1198,247 +1212,200 @@ export type Mutation = { systemTasksRetryOne: SystemTasksBasic; }; - export type MutationBangumiCreateBatchArgs = { data: Array; }; - export type MutationBangumiCreateOneArgs = { data: BangumiInsertInput; }; - export type MutationBangumiDeleteArgs = { filter?: InputMaybe; }; - export type MutationBangumiUpdateArgs = { data: BangumiUpdateInput; filter?: InputMaybe; }; - export type MutationCredential3rdCheckAvailableArgs = { filter?: InputMaybe; }; - export type MutationCredential3rdCreateBatchArgs = { data: Array; }; - export type MutationCredential3rdCreateOneArgs = { data: Credential3rdInsertInput; }; - export type MutationCredential3rdDeleteArgs = { filter?: InputMaybe; }; - export type MutationCredential3rdUpdateArgs = { data: Credential3rdUpdateInput; filter?: InputMaybe; }; - export type MutationCronCreateBatchArgs = { data: Array; }; - export type MutationCronCreateOneArgs = { data: CronInsertInput; }; - export type MutationCronDeleteArgs = { filter?: InputMaybe; }; - export type MutationCronUpdateArgs = { data: CronUpdateInput; filter?: InputMaybe; }; - export type MutationDownloadersCreateBatchArgs = { data: Array; }; - export type MutationDownloadersCreateOneArgs = { data: DownloadersInsertInput; }; - export type MutationDownloadersDeleteArgs = { filter?: InputMaybe; }; - export type MutationDownloadersUpdateArgs = { data: DownloadersUpdateInput; filter?: InputMaybe; }; - export type MutationDownloadsCreateBatchArgs = { data: Array; }; - export type MutationDownloadsCreateOneArgs = { data: DownloadsInsertInput; }; - export type MutationDownloadsDeleteArgs = { filter?: InputMaybe; }; - export type MutationDownloadsUpdateArgs = { data: DownloadsUpdateInput; filter?: InputMaybe; }; - export type MutationEpisodesCreateBatchArgs = { data: Array; }; - export type MutationEpisodesCreateOneArgs = { data: EpisodesInsertInput; }; - export type MutationEpisodesDeleteArgs = { filter?: InputMaybe; }; - export type MutationEpisodesUpdateArgs = { data: EpisodesUpdateInput; filter?: InputMaybe; }; - export type MutationFeedsCreateBatchArgs = { data: Array; }; - export type MutationFeedsCreateOneArgs = { data: FeedsInsertInput; }; - export type MutationFeedsDeleteArgs = { filter?: InputMaybe; }; - export type MutationFeedsUpdateArgs = { data: FeedsUpdateInput; filter?: InputMaybe; }; - export type MutationSubscriberTasksCreateOneArgs = { data: SubscriberTasksInsertInput; }; - export type MutationSubscriberTasksDeleteArgs = { filter?: InputMaybe; }; - export type MutationSubscriberTasksRetryOneArgs = { filter?: InputMaybe; }; - export type MutationSubscriptionBangumiCreateBatchArgs = { data: Array; }; - export type MutationSubscriptionBangumiCreateOneArgs = { data: SubscriptionBangumiInsertInput; }; - export type MutationSubscriptionBangumiDeleteArgs = { filter?: InputMaybe; }; - export type MutationSubscriptionBangumiUpdateArgs = { data: SubscriptionBangumiUpdateInput; filter?: InputMaybe; }; - export type MutationSubscriptionEpisodeCreateBatchArgs = { data: Array; }; - export type MutationSubscriptionEpisodeCreateOneArgs = { data: SubscriptionEpisodeInsertInput; }; - export type MutationSubscriptionEpisodeDeleteArgs = { filter?: InputMaybe; }; - export type MutationSubscriptionEpisodeUpdateArgs = { data: SubscriptionEpisodeUpdateInput; filter?: InputMaybe; }; - export type MutationSubscriptionsCreateBatchArgs = { data: Array; }; - export type MutationSubscriptionsCreateOneArgs = { data: SubscriptionsInsertInput; }; - export type MutationSubscriptionsDeleteArgs = { filter?: InputMaybe; }; - export type MutationSubscriptionsUpdateArgs = { data: SubscriptionsUpdateInput; filter?: InputMaybe; }; - export type MutationSystemTasksCreateOneArgs = { data: SystemTasksInsertInput; }; - export type MutationSystemTasksDeleteArgs = { filter?: InputMaybe; }; - export type MutationSystemTasksRetryOneArgs = { filter?: InputMaybe; }; @@ -1450,10 +1417,10 @@ export type OffsetInput = { export const OrderByEnum = { Asc: 'ASC', - Desc: 'DESC' + Desc: 'DESC', } as const; -export type OrderByEnum = typeof OrderByEnum[keyof typeof OrderByEnum]; +export type OrderByEnum = (typeof OrderByEnum)[keyof typeof OrderByEnum]; export type PageInfo = { __typename?: 'PageInfo'; endCursor?: Maybe; @@ -1499,96 +1466,82 @@ export type Query = { systemTasks: SystemTasksConnection; }; - export type Query_Sea_Orm_Entity_MetadataArgs = { table_name: Scalars['String']['input']; }; - export type QueryBangumiArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QueryCredential3rdArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QueryCronArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QueryDownloadersArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QueryDownloadsArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QueryEpisodesArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QueryFeedsArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QuerySubscriberTasksArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QuerySubscribersArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QuerySubscriptionBangumiArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QuerySubscriptionEpisodeArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QuerySubscriptionsArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QuerySystemTasksArgs = { filter?: InputMaybe; orderBy?: InputMaybe; @@ -1625,17 +1578,20 @@ export const SubscriberTaskStatusEnum = { Killed: 'Killed', Pending: 'Pending', Running: 'Running', - Scheduled: 'Scheduled' + Scheduled: 'Scheduled', } as const; -export type SubscriberTaskStatusEnum = typeof SubscriberTaskStatusEnum[keyof typeof SubscriberTaskStatusEnum]; +export type SubscriberTaskStatusEnum = + (typeof SubscriberTaskStatusEnum)[keyof typeof SubscriberTaskStatusEnum]; export const SubscriberTaskTypeEnum = { SyncOneSubscriptionFeedsFull: 'sync_one_subscription_feeds_full', - SyncOneSubscriptionFeedsIncremental: 'sync_one_subscription_feeds_incremental', - SyncOneSubscriptionSources: 'sync_one_subscription_sources' + SyncOneSubscriptionFeedsIncremental: + 'sync_one_subscription_feeds_incremental', + SyncOneSubscriptionSources: 'sync_one_subscription_sources', } as const; -export type SubscriberTaskTypeEnum = typeof SubscriberTaskTypeEnum[keyof typeof SubscriberTaskTypeEnum]; +export type SubscriberTaskTypeEnum = + (typeof SubscriberTaskTypeEnum)[keyof typeof SubscriberTaskTypeEnum]; export type SubscriberTasks = { __typename?: 'SubscriberTasks'; attempts: Scalars['Int']['output']; @@ -1751,56 +1707,48 @@ export type Subscribers = { updatedAt: Scalars['String']['output']; }; - export type SubscribersBangumiArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscribersCredential3rdArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscribersDownloaderArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscribersEpisodeArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscribersFeedArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscribersSubscriberTaskArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscribersSubscriptionArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscribersSystemTaskArgs = { filter?: InputMaybe; orderBy?: InputMaybe; @@ -1900,10 +1848,11 @@ export type SubscriptionBangumiUpdateInput = { export const SubscriptionCategoryEnum = { MikanBangumi: 'mikan_bangumi', MikanSeason: 'mikan_season', - MikanSubscriber: 'mikan_subscriber' + MikanSubscriber: 'mikan_subscriber', } as const; -export type SubscriptionCategoryEnum = typeof SubscriptionCategoryEnum[keyof typeof SubscriptionCategoryEnum]; +export type SubscriptionCategoryEnum = + (typeof SubscriptionCategoryEnum)[keyof typeof SubscriptionCategoryEnum]; export type SubscriptionCategoryEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -1986,6 +1935,7 @@ export type Subscriptions = { createdAt: Scalars['String']['output']; credential3rd?: Maybe; credentialId?: Maybe; + cron: CronConnection; displayName: Scalars['String']['output']; enabled: Scalars['Boolean']['output']; episode: EpisodesConnection; @@ -2000,13 +1950,17 @@ export type Subscriptions = { updatedAt: Scalars['String']['output']; }; - export type SubscriptionsBangumiArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; +export type SubscriptionsCronArgs = { + filter?: InputMaybe; + orderBy?: InputMaybe; + pagination?: InputMaybe; +}; export type SubscriptionsEpisodeArgs = { filter?: InputMaybe; @@ -2014,28 +1968,24 @@ export type SubscriptionsEpisodeArgs = { pagination?: InputMaybe; }; - export type SubscriptionsFeedArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscriptionsSubscriberTaskArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscriptionsSubscriptionBangumiArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscriptionsSubscriptionEpisodeArgs = { filter?: InputMaybe; orderBy?: InputMaybe; @@ -2124,15 +2074,18 @@ export const SystemTaskStatusEnum = { Killed: 'Killed', Pending: 'Pending', Running: 'Running', - Scheduled: 'Scheduled' + Scheduled: 'Scheduled', } as const; -export type SystemTaskStatusEnum = typeof SystemTaskStatusEnum[keyof typeof SystemTaskStatusEnum]; +export type SystemTaskStatusEnum = + (typeof SystemTaskStatusEnum)[keyof typeof SystemTaskStatusEnum]; export const SystemTaskTypeEnum = { - OptimizeImage: 'optimize_image' + OptimizeImage: 'optimize_image', + Test: 'test', } as const; -export type SystemTaskTypeEnum = typeof SystemTaskTypeEnum[keyof typeof SystemTaskTypeEnum]; +export type SystemTaskTypeEnum = + (typeof SystemTaskTypeEnum)[keyof typeof SystemTaskTypeEnum]; export type SystemTasks = { __typename?: 'SystemTasks'; attempts: Scalars['Int']['output']; @@ -2247,58 +2200,203 @@ export type GetCredential3rdQueryVariables = Exact<{ pagination?: InputMaybe; }>; - -export type GetCredential3rdQuery = { __typename?: 'Query', credential3rd: { __typename?: 'Credential3rdConnection', nodes: Array<{ __typename?: 'Credential3rd', id: number, cookies?: string | null, username?: string | null, password?: string | null, userAgent?: string | null, createdAt: string, updatedAt: string, credentialType: Credential3rdTypeEnum }>, paginationInfo?: { __typename?: 'PaginationInfo', total: number, pages: number } | null } }; +export type GetCredential3rdQuery = { + __typename?: 'Query'; + credential3rd: { + __typename?: 'Credential3rdConnection'; + nodes: Array<{ + __typename?: 'Credential3rd'; + id: number; + cookies?: string | null; + username?: string | null; + password?: string | null; + userAgent?: string | null; + createdAt: string; + updatedAt: string; + credentialType: Credential3rdTypeEnum; + }>; + paginationInfo?: { + __typename?: 'PaginationInfo'; + total: number; + pages: number; + } | null; + }; +}; export type InsertCredential3rdMutationVariables = Exact<{ data: Credential3rdInsertInput; }>; - -export type InsertCredential3rdMutation = { __typename?: 'Mutation', credential3rdCreateOne: { __typename?: 'Credential3rdBasic', id: number, cookies?: string | null, username?: string | null, password?: string | null, userAgent?: string | null, createdAt: string, updatedAt: string, credentialType: Credential3rdTypeEnum } }; +export type InsertCredential3rdMutation = { + __typename?: 'Mutation'; + credential3rdCreateOne: { + __typename?: 'Credential3rdBasic'; + id: number; + cookies?: string | null; + username?: string | null; + password?: string | null; + userAgent?: string | null; + createdAt: string; + updatedAt: string; + credentialType: Credential3rdTypeEnum; + }; +}; export type UpdateCredential3rdMutationVariables = Exact<{ data: Credential3rdUpdateInput; filter: Credential3rdFilterInput; }>; - -export type UpdateCredential3rdMutation = { __typename?: 'Mutation', credential3rdUpdate: Array<{ __typename?: 'Credential3rdBasic', id: number, cookies?: string | null, username?: string | null, password?: string | null, userAgent?: string | null, createdAt: string, updatedAt: string, credentialType: Credential3rdTypeEnum }> }; +export type UpdateCredential3rdMutation = { + __typename?: 'Mutation'; + credential3rdUpdate: Array<{ + __typename?: 'Credential3rdBasic'; + id: number; + cookies?: string | null; + username?: string | null; + password?: string | null; + userAgent?: string | null; + createdAt: string; + updatedAt: string; + credentialType: Credential3rdTypeEnum; + }>; +}; export type DeleteCredential3rdMutationVariables = Exact<{ filter: Credential3rdFilterInput; }>; - -export type DeleteCredential3rdMutation = { __typename?: 'Mutation', credential3rdDelete: number }; +export type DeleteCredential3rdMutation = { + __typename?: 'Mutation'; + credential3rdDelete: number; +}; export type GetCredential3rdDetailQueryVariables = Exact<{ id: Scalars['Int']['input']; }>; - -export type GetCredential3rdDetailQuery = { __typename?: 'Query', credential3rd: { __typename?: 'Credential3rdConnection', nodes: Array<{ __typename?: 'Credential3rd', id: number, cookies?: string | null, username?: string | null, password?: string | null, userAgent?: string | null, createdAt: string, updatedAt: string, credentialType: Credential3rdTypeEnum }> } }; +export type GetCredential3rdDetailQuery = { + __typename?: 'Query'; + credential3rd: { + __typename?: 'Credential3rdConnection'; + nodes: Array<{ + __typename?: 'Credential3rd'; + id: number; + cookies?: string | null; + username?: string | null; + password?: string | null; + userAgent?: string | null; + createdAt: string; + updatedAt: string; + credentialType: Credential3rdTypeEnum; + }>; + }; +}; export type CheckCredential3rdAvailableMutationVariables = Exact<{ filter: Credential3rdFilterInput; }>; +export type CheckCredential3rdAvailableMutation = { + __typename?: 'Mutation'; + credential3rdCheckAvailable: { + __typename?: 'Credential3rdCheckAvailableInfo'; + available: boolean; + }; +}; -export type CheckCredential3rdAvailableMutation = { __typename?: 'Mutation', credential3rdCheckAvailable: { __typename?: 'Credential3rdCheckAvailableInfo', available: boolean } }; +export type GetCronsQueryVariables = Exact<{ + filter: CronFilterInput; + orderBy: CronOrderInput; + pagination: PaginationInput; +}>; + +export type GetCronsQuery = { + __typename?: 'Query'; + cron: { + __typename?: 'CronConnection'; + nodes: Array<{ + __typename?: 'Cron'; + id: number; + cronExpr: string; + nextRun?: string | null; + lastRun?: string | null; + lastError?: string | null; + status: CronStatusEnum; + lockedAt?: string | null; + lockedBy?: string | null; + createdAt: string; + updatedAt: string; + timeoutMs?: number | null; + maxAttempts: number; + priority: number; + attempts: number; + subscriberTaskCron?: SubscriberTaskType | null; + subscriberTask: { + __typename?: 'SubscriberTasksConnection'; + nodes: Array<{ + __typename?: 'SubscriberTasks'; + id: string; + job: SubscriberTaskType; + taskType: SubscriberTaskTypeEnum; + status: SubscriberTaskStatusEnum; + attempts: number; + maxAttempts: number; + runAt: string; + lastError?: string | null; + lockAt?: string | null; + lockBy?: string | null; + doneAt?: string | null; + priority: number; + subscription?: { + __typename?: 'Subscriptions'; + displayName: string; + sourceUrl: string; + } | null; + }>; + }; + }>; + paginationInfo?: { + __typename?: 'PaginationInfo'; + total: number; + pages: number; + } | null; + }; +}; + +export type DeleteCronsMutationVariables = Exact<{ + filter: CronFilterInput; +}>; + +export type DeleteCronsMutation = { + __typename?: 'Mutation'; + cronDelete: number; +}; export type InsertFeedMutationVariables = Exact<{ data: FeedsInsertInput; }>; - -export type InsertFeedMutation = { __typename?: 'Mutation', feedsCreateOne: { __typename?: 'FeedsBasic', id: number, createdAt: string, updatedAt: string, feedType: FeedTypeEnum, token: string } }; +export type InsertFeedMutation = { + __typename?: 'Mutation'; + feedsCreateOne: { + __typename?: 'FeedsBasic'; + id: number; + createdAt: string; + updatedAt: string; + feedType: FeedTypeEnum; + token: string; + }; +}; export type DeleteFeedMutationVariables = Exact<{ filter: FeedsFilterInput; }>; - -export type DeleteFeedMutation = { __typename?: 'Mutation', feedsDelete: number }; +export type DeleteFeedMutation = { + __typename?: 'Mutation'; + feedsDelete: number; +}; export type GetSubscriptionsQueryVariables = Exact<{ filter: SubscriptionsFilterInput; @@ -2306,37 +2404,162 @@ export type GetSubscriptionsQueryVariables = Exact<{ pagination: PaginationInput; }>; - -export type GetSubscriptionsQuery = { __typename?: 'Query', subscriptions: { __typename?: 'SubscriptionsConnection', nodes: Array<{ __typename?: 'Subscriptions', id: number, createdAt: string, updatedAt: string, displayName: string, category: SubscriptionCategoryEnum, sourceUrl: string, enabled: boolean, credentialId?: number | null }>, paginationInfo?: { __typename?: 'PaginationInfo', total: number, pages: number } | null } }; +export type GetSubscriptionsQuery = { + __typename?: 'Query'; + subscriptions: { + __typename?: 'SubscriptionsConnection'; + nodes: Array<{ + __typename?: 'Subscriptions'; + id: number; + createdAt: string; + updatedAt: string; + displayName: string; + category: SubscriptionCategoryEnum; + sourceUrl: string; + enabled: boolean; + credentialId?: number | null; + }>; + paginationInfo?: { + __typename?: 'PaginationInfo'; + total: number; + pages: number; + } | null; + }; +}; export type InsertSubscriptionMutationVariables = Exact<{ data: SubscriptionsInsertInput; }>; - -export type InsertSubscriptionMutation = { __typename?: 'Mutation', subscriptionsCreateOne: { __typename?: 'SubscriptionsBasic', id: number, createdAt: string, updatedAt: string, displayName: string, category: SubscriptionCategoryEnum, sourceUrl: string, enabled: boolean, credentialId?: number | null } }; +export type InsertSubscriptionMutation = { + __typename?: 'Mutation'; + subscriptionsCreateOne: { + __typename?: 'SubscriptionsBasic'; + id: number; + createdAt: string; + updatedAt: string; + displayName: string; + category: SubscriptionCategoryEnum; + sourceUrl: string; + enabled: boolean; + credentialId?: number | null; + }; +}; export type UpdateSubscriptionsMutationVariables = Exact<{ data: SubscriptionsUpdateInput; filter: SubscriptionsFilterInput; }>; - -export type UpdateSubscriptionsMutation = { __typename?: 'Mutation', subscriptionsUpdate: Array<{ __typename?: 'SubscriptionsBasic', id: number, createdAt: string, updatedAt: string, displayName: string, category: SubscriptionCategoryEnum, sourceUrl: string, enabled: boolean }> }; +export type UpdateSubscriptionsMutation = { + __typename?: 'Mutation'; + subscriptionsUpdate: Array<{ + __typename?: 'SubscriptionsBasic'; + id: number; + createdAt: string; + updatedAt: string; + displayName: string; + category: SubscriptionCategoryEnum; + sourceUrl: string; + enabled: boolean; + }>; +}; export type DeleteSubscriptionsMutationVariables = Exact<{ filter?: InputMaybe; }>; - -export type DeleteSubscriptionsMutation = { __typename?: 'Mutation', subscriptionsDelete: number }; +export type DeleteSubscriptionsMutation = { + __typename?: 'Mutation'; + subscriptionsDelete: number; +}; export type GetSubscriptionDetailQueryVariables = Exact<{ id: Scalars['Int']['input']; }>; - -export type GetSubscriptionDetailQuery = { __typename?: 'Query', subscriptions: { __typename?: 'SubscriptionsConnection', nodes: Array<{ __typename?: 'Subscriptions', id: number, subscriberId: number, displayName: string, createdAt: string, updatedAt: string, category: SubscriptionCategoryEnum, sourceUrl: string, enabled: boolean, feed: { __typename?: 'FeedsConnection', nodes: Array<{ __typename?: 'Feeds', id: number, createdAt: string, updatedAt: string, token: string, feedType: FeedTypeEnum, feedSource: FeedSourceEnum }> }, subscriberTask: { __typename?: 'SubscriberTasksConnection', nodes: Array<{ __typename?: 'SubscriberTasks', id: string, taskType: SubscriberTaskTypeEnum, status: SubscriberTaskStatusEnum }> }, credential3rd?: { __typename?: 'Credential3rd', id: number, username?: string | null } | null, bangumi: { __typename?: 'BangumiConnection', nodes: Array<{ __typename?: 'Bangumi', createdAt: string, updatedAt: string, id: number, mikanBangumiId?: string | null, displayName: string, season: number, seasonRaw?: string | null, fansub?: string | null, mikanFansubId?: string | null, rssLink?: string | null, posterLink?: string | null, homepage?: string | null }> } }> } }; +export type GetSubscriptionDetailQuery = { + __typename?: 'Query'; + subscriptions: { + __typename?: 'SubscriptionsConnection'; + nodes: Array<{ + __typename?: 'Subscriptions'; + id: number; + subscriberId: number; + displayName: string; + createdAt: string; + updatedAt: string; + category: SubscriptionCategoryEnum; + sourceUrl: string; + enabled: boolean; + feed: { + __typename?: 'FeedsConnection'; + nodes: Array<{ + __typename?: 'Feeds'; + id: number; + createdAt: string; + updatedAt: string; + token: string; + feedType: FeedTypeEnum; + feedSource: FeedSourceEnum; + }>; + }; + subscriberTask: { + __typename?: 'SubscriberTasksConnection'; + nodes: Array<{ + __typename?: 'SubscriberTasks'; + id: string; + taskType: SubscriberTaskTypeEnum; + status: SubscriberTaskStatusEnum; + }>; + }; + credential3rd?: { + __typename?: 'Credential3rd'; + id: number; + username?: string | null; + } | null; + cron: { + __typename?: 'CronConnection'; + nodes: Array<{ + __typename?: 'Cron'; + id: number; + cronExpr: string; + nextRun?: string | null; + lastRun?: string | null; + lastError?: string | null; + status: CronStatusEnum; + lockedAt?: string | null; + lockedBy?: string | null; + createdAt: string; + updatedAt: string; + timeoutMs?: number | null; + maxAttempts: number; + priority: number; + attempts: number; + subscriberTaskCron?: SubscriberTaskType | null; + }>; + }; + bangumi: { + __typename?: 'BangumiConnection'; + nodes: Array<{ + __typename?: 'Bangumi'; + createdAt: string; + updatedAt: string; + id: number; + mikanBangumiId?: string | null; + displayName: string; + season: number; + seasonRaw?: string | null; + fansub?: string | null; + mikanFansubId?: string | null; + rssLink?: string | null; + posterLink?: string | null; + homepage?: string | null; + }>; + }; + }>; + }; +}; export type GetTasksQueryVariables = Exact<{ filter: SubscriberTasksFilterInput; @@ -2344,45 +2567,1983 @@ export type GetTasksQueryVariables = Exact<{ pagination: PaginationInput; }>; - -export type GetTasksQuery = { __typename?: 'Query', subscriberTasks: { __typename?: 'SubscriberTasksConnection', nodes: Array<{ __typename?: 'SubscriberTasks', id: string, job: SubscriberTaskType, taskType: SubscriberTaskTypeEnum, status: SubscriberTaskStatusEnum, attempts: number, maxAttempts: number, runAt: string, lastError?: string | null, lockAt?: string | null, lockBy?: string | null, doneAt?: string | null, priority: number, subscription?: { __typename?: 'Subscriptions', displayName: string, sourceUrl: string } | null }>, paginationInfo?: { __typename?: 'PaginationInfo', total: number, pages: number } | null } }; +export type GetTasksQuery = { + __typename?: 'Query'; + subscriberTasks: { + __typename?: 'SubscriberTasksConnection'; + nodes: Array<{ + __typename?: 'SubscriberTasks'; + id: string; + job: SubscriberTaskType; + taskType: SubscriberTaskTypeEnum; + status: SubscriberTaskStatusEnum; + attempts: number; + maxAttempts: number; + runAt: string; + lastError?: string | null; + lockAt?: string | null; + lockBy?: string | null; + doneAt?: string | null; + priority: number; + subscription?: { + __typename?: 'Subscriptions'; + displayName: string; + sourceUrl: string; + } | null; + }>; + paginationInfo?: { + __typename?: 'PaginationInfo'; + total: number; + pages: number; + } | null; + }; +}; export type InsertSubscriberTaskMutationVariables = Exact<{ data: SubscriberTasksInsertInput; }>; - -export type InsertSubscriberTaskMutation = { __typename?: 'Mutation', subscriberTasksCreateOne: { __typename?: 'SubscriberTasksBasic', id: string } }; +export type InsertSubscriberTaskMutation = { + __typename?: 'Mutation'; + subscriberTasksCreateOne: { __typename?: 'SubscriberTasksBasic'; id: string }; +}; export type DeleteTasksMutationVariables = Exact<{ filter: SubscriberTasksFilterInput; }>; - -export type DeleteTasksMutation = { __typename?: 'Mutation', subscriberTasksDelete: number }; +export type DeleteTasksMutation = { + __typename?: 'Mutation'; + subscriberTasksDelete: number; +}; export type RetryTasksMutationVariables = Exact<{ filter: SubscriberTasksFilterInput; }>; +export type RetryTasksMutation = { + __typename?: 'Mutation'; + subscriberTasksRetryOne: { + __typename?: 'SubscriberTasksBasic'; + id: string; + job: SubscriberTaskType; + taskType: SubscriberTaskTypeEnum; + status: SubscriberTaskStatusEnum; + attempts: number; + maxAttempts: number; + runAt: string; + lastError?: string | null; + lockAt?: string | null; + lockBy?: string | null; + doneAt?: string | null; + priority: number; + }; +}; -export type RetryTasksMutation = { __typename?: 'Mutation', subscriberTasksRetryOne: { __typename?: 'SubscriberTasksBasic', id: string, job: SubscriberTaskType, taskType: SubscriberTaskTypeEnum, status: SubscriberTaskStatusEnum, attempts: number, maxAttempts: number, runAt: string, lastError?: string | null, lockAt?: string | null, lockBy?: string | null, doneAt?: string | null, priority: number } }; - - -export const GetCredential3rdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCredential3rd"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Credential3rdFilterInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Credential3rdOrderInput"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"pagination"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PaginationInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"credential3rd"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}},{"kind":"Argument","name":{"kind":"Name","value":"pagination"},"value":{"kind":"Variable","name":{"kind":"Name","value":"pagination"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"cookies"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"password"}},{"kind":"Field","name":{"kind":"Name","value":"userAgent"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"credentialType"}}]}},{"kind":"Field","name":{"kind":"Name","value":"paginationInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"total"}},{"kind":"Field","name":{"kind":"Name","value":"pages"}}]}}]}}]}}]} as unknown as DocumentNode; -export const InsertCredential3rdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"InsertCredential3rd"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Credential3rdInsertInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"credential3rdCreateOne"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"data"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"cookies"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"password"}},{"kind":"Field","name":{"kind":"Name","value":"userAgent"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"credentialType"}}]}}]}}]} as unknown as DocumentNode; -export const UpdateCredential3rdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateCredential3rd"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Credential3rdUpdateInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Credential3rdFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"credential3rdUpdate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"data"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"cookies"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"password"}},{"kind":"Field","name":{"kind":"Name","value":"userAgent"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"credentialType"}}]}}]}}]} as unknown as DocumentNode; -export const DeleteCredential3rdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteCredential3rd"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Credential3rdFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"credential3rdDelete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}]}]}}]} as unknown as DocumentNode; -export const GetCredential3rdDetailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCredential3rdDetail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"credential3rd"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"cookies"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"password"}},{"kind":"Field","name":{"kind":"Name","value":"userAgent"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"credentialType"}}]}}]}}]}}]} as unknown as DocumentNode; -export const CheckCredential3rdAvailableDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CheckCredential3rdAvailable"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Credential3rdFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"credential3rdCheckAvailable"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"available"}}]}}]}}]} as unknown as DocumentNode; -export const InsertFeedDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"InsertFeed"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"FeedsInsertInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"feedsCreateOne"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"data"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"feedType"}},{"kind":"Field","name":{"kind":"Name","value":"token"}}]}}]}}]} as unknown as DocumentNode; -export const DeleteFeedDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteFeed"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"FeedsFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"feedsDelete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}]}]}}]} as unknown as DocumentNode; -export const GetSubscriptionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSubscriptions"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriptionsFilterInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriptionsOrderInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"pagination"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PaginationInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriptions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"pagination"},"value":{"kind":"Variable","name":{"kind":"Name","value":"pagination"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"category"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"credentialId"}}]}},{"kind":"Field","name":{"kind":"Name","value":"paginationInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"total"}},{"kind":"Field","name":{"kind":"Name","value":"pages"}}]}}]}}]}}]} as unknown as DocumentNode; -export const InsertSubscriptionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"InsertSubscription"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriptionsInsertInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriptionsCreateOne"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"data"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"category"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"credentialId"}}]}}]}}]} as unknown as DocumentNode; -export const UpdateSubscriptionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateSubscriptions"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriptionsUpdateInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriptionsFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriptionsUpdate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"data"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"category"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}}]}}]}}]} as unknown as DocumentNode; -export const DeleteSubscriptionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteSubscriptions"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriptionsFilterInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriptionsDelete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}]}]}}]} as unknown as DocumentNode; -export const GetSubscriptionDetailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSubscriptionDetail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriptions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"subscriberId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"category"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"feed"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"feedType"}},{"kind":"Field","name":{"kind":"Name","value":"feedSource"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"subscriberTask"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"taskType"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"credential3rd"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"Field","name":{"kind":"Name","value":"bangumi"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"mikanBangumiId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"season"}},{"kind":"Field","name":{"kind":"Name","value":"seasonRaw"}},{"kind":"Field","name":{"kind":"Name","value":"fansub"}},{"kind":"Field","name":{"kind":"Name","value":"mikanFansubId"}},{"kind":"Field","name":{"kind":"Name","value":"rssLink"}},{"kind":"Field","name":{"kind":"Name","value":"posterLink"}},{"kind":"Field","name":{"kind":"Name","value":"homepage"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; -export const GetTasksDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTasks"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriberTasksFilterInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriberTasksOrderInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"pagination"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PaginationInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriberTasks"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"pagination"},"value":{"kind":"Variable","name":{"kind":"Name","value":"pagination"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"job"}},{"kind":"Field","name":{"kind":"Name","value":"taskType"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"attempts"}},{"kind":"Field","name":{"kind":"Name","value":"maxAttempts"}},{"kind":"Field","name":{"kind":"Name","value":"runAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastError"}},{"kind":"Field","name":{"kind":"Name","value":"lockAt"}},{"kind":"Field","name":{"kind":"Name","value":"lockBy"}},{"kind":"Field","name":{"kind":"Name","value":"doneAt"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"subscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrl"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"paginationInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"total"}},{"kind":"Field","name":{"kind":"Name","value":"pages"}}]}}]}}]}}]} as unknown as DocumentNode; -export const InsertSubscriberTaskDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"InsertSubscriberTask"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriberTasksInsertInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriberTasksCreateOne"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"data"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; -export const DeleteTasksDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteTasks"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriberTasksFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriberTasksDelete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}]}]}}]} as unknown as DocumentNode; -export const RetryTasksDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RetryTasks"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriberTasksFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriberTasksRetryOne"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"job"}},{"kind":"Field","name":{"kind":"Name","value":"taskType"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"attempts"}},{"kind":"Field","name":{"kind":"Name","value":"maxAttempts"}},{"kind":"Field","name":{"kind":"Name","value":"runAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastError"}},{"kind":"Field","name":{"kind":"Name","value":"lockAt"}},{"kind":"Field","name":{"kind":"Name","value":"lockBy"}},{"kind":"Field","name":{"kind":"Name","value":"doneAt"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const GetCredential3rdDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetCredential3rd' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Credential3rdFilterInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' }, + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Credential3rdOrderInput' }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'pagination' }, + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'PaginationInput' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'credential3rd' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'orderBy' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'pagination' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'pagination' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'cookies' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'username' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'password' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'userAgent' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'credentialType' }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'paginationInfo' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'total' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pages' } }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + GetCredential3rdQuery, + GetCredential3rdQueryVariables +>; +export const InsertCredential3rdDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'InsertCredential3rd' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'data' } }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Credential3rdInsertInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'credential3rdCreateOne' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'data' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'data' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'cookies' } }, + { kind: 'Field', name: { kind: 'Name', value: 'username' } }, + { kind: 'Field', name: { kind: 'Name', value: 'password' } }, + { kind: 'Field', name: { kind: 'Name', value: 'userAgent' } }, + { kind: 'Field', name: { kind: 'Name', value: 'createdAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'credentialType' }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + InsertCredential3rdMutation, + InsertCredential3rdMutationVariables +>; +export const UpdateCredential3rdDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'UpdateCredential3rd' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'data' } }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Credential3rdUpdateInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Credential3rdFilterInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'credential3rdUpdate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'data' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'data' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'cookies' } }, + { kind: 'Field', name: { kind: 'Name', value: 'username' } }, + { kind: 'Field', name: { kind: 'Name', value: 'password' } }, + { kind: 'Field', name: { kind: 'Name', value: 'userAgent' } }, + { kind: 'Field', name: { kind: 'Name', value: 'createdAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'credentialType' }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + UpdateCredential3rdMutation, + UpdateCredential3rdMutationVariables +>; +export const DeleteCredential3rdDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'DeleteCredential3rd' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Credential3rdFilterInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'credential3rdDelete' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + DeleteCredential3rdMutation, + DeleteCredential3rdMutationVariables +>; +export const GetCredential3rdDetailDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetCredential3rdDetail' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'credential3rd' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'id' }, + }, + }, + ], + }, + }, + ], + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'cookies' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'username' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'password' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'userAgent' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'credentialType' }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + GetCredential3rdDetailQuery, + GetCredential3rdDetailQueryVariables +>; +export const CheckCredential3rdAvailableDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'CheckCredential3rdAvailable' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Credential3rdFilterInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'credential3rdCheckAvailable' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'available' } }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + CheckCredential3rdAvailableMutation, + CheckCredential3rdAvailableMutationVariables +>; +export const GetCronsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetCrons' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'CronFilterInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'CronOrderInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'pagination' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'PaginationInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'cron' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'pagination' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'pagination' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'orderBy' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'cronExpr' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'nextRun' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lastRun' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lastError' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'status' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockedBy' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'timeoutMs' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'maxAttempts' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'priority' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'attempts' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberTaskCron' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberTask' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'id' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'job' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'taskType' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'status' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'attempts' }, + }, + { + kind: 'Field', + name: { + kind: 'Name', + value: 'maxAttempts', + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'runAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lastError' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockBy' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'doneAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'priority' }, + }, + { + kind: 'Field', + name: { + kind: 'Name', + value: 'subscription', + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { + kind: 'Name', + value: 'displayName', + }, + }, + { + kind: 'Field', + name: { + kind: 'Name', + value: 'sourceUrl', + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'paginationInfo' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'total' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pages' } }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const DeleteCronsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'DeleteCrons' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'CronFilterInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'cronDelete' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const InsertFeedDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'InsertFeed' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'data' } }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'FeedsInsertInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'feedsCreateOne' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'data' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'data' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'createdAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'feedType' } }, + { kind: 'Field', name: { kind: 'Name', value: 'token' } }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const DeleteFeedDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'DeleteFeed' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'FeedsFilterInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'feedsDelete' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const GetSubscriptionsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetSubscriptions' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriptionsFilterInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriptionsOrderInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'pagination' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'PaginationInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriptions' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'pagination' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'pagination' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'orderBy' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'displayName' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'category' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'sourceUrl' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'enabled' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'credentialId' }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'paginationInfo' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'total' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pages' } }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + GetSubscriptionsQuery, + GetSubscriptionsQueryVariables +>; +export const InsertSubscriptionDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'InsertSubscription' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'data' } }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriptionsInsertInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriptionsCreateOne' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'data' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'data' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'createdAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'displayName' } }, + { kind: 'Field', name: { kind: 'Name', value: 'category' } }, + { kind: 'Field', name: { kind: 'Name', value: 'sourceUrl' } }, + { kind: 'Field', name: { kind: 'Name', value: 'enabled' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'credentialId' }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + InsertSubscriptionMutation, + InsertSubscriptionMutationVariables +>; +export const UpdateSubscriptionsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'UpdateSubscriptions' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'data' } }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriptionsUpdateInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriptionsFilterInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriptionsUpdate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'data' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'data' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'createdAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'displayName' } }, + { kind: 'Field', name: { kind: 'Name', value: 'category' } }, + { kind: 'Field', name: { kind: 'Name', value: 'sourceUrl' } }, + { kind: 'Field', name: { kind: 'Name', value: 'enabled' } }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + UpdateSubscriptionsMutation, + UpdateSubscriptionsMutationVariables +>; +export const DeleteSubscriptionsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'DeleteSubscriptions' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriptionsFilterInput' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriptionsDelete' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + DeleteSubscriptionsMutation, + DeleteSubscriptionsMutationVariables +>; +export const GetSubscriptionDetailDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetSubscriptionDetail' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriptions' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'id' }, + }, + }, + ], + }, + }, + ], + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberId' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'displayName' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'category' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'sourceUrl' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'enabled' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'feed' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'id' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'token' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'feedType' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'feedSource' }, + }, + ], + }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberTask' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'id' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'taskType' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'status' }, + }, + ], + }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'credential3rd' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'id' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'username' }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'cron' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'id' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'cronExpr' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'nextRun' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lastRun' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lastError' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'status' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockedBy' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'timeoutMs' }, + }, + { + kind: 'Field', + name: { + kind: 'Name', + value: 'maxAttempts', + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'priority' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'attempts' }, + }, + { + kind: 'Field', + name: { + kind: 'Name', + value: 'subscriberTaskCron', + }, + }, + ], + }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'bangumi' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'id' }, + }, + { + kind: 'Field', + name: { + kind: 'Name', + value: 'mikanBangumiId', + }, + }, + { + kind: 'Field', + name: { + kind: 'Name', + value: 'displayName', + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'season' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'seasonRaw' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'fansub' }, + }, + { + kind: 'Field', + name: { + kind: 'Name', + value: 'mikanFansubId', + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'rssLink' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'posterLink' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'homepage' }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + GetSubscriptionDetailQuery, + GetSubscriptionDetailQueryVariables +>; +export const GetTasksDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetTasks' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriberTasksFilterInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriberTasksOrderInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'pagination' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'PaginationInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberTasks' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'pagination' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'pagination' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'orderBy' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'job' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'taskType' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'status' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'attempts' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'maxAttempts' }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'runAt' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lastError' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockBy' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'doneAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'priority' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'subscription' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'displayName' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'sourceUrl' }, + }, + ], + }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'paginationInfo' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'total' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pages' } }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const InsertSubscriberTaskDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'InsertSubscriberTask' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'data' } }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriberTasksInsertInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberTasksCreateOne' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'data' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'data' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + InsertSubscriberTaskMutation, + InsertSubscriberTaskMutationVariables +>; +export const DeleteTasksDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'DeleteTasks' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriberTasksFilterInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberTasksDelete' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const RetryTasksDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'RetryTasks' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriberTasksFilterInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberTasksRetryOne' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'job' } }, + { kind: 'Field', name: { kind: 'Name', value: 'taskType' } }, + { kind: 'Field', name: { kind: 'Name', value: 'status' } }, + { kind: 'Field', name: { kind: 'Name', value: 'attempts' } }, + { kind: 'Field', name: { kind: 'Name', value: 'maxAttempts' } }, + { kind: 'Field', name: { kind: 'Name', value: 'runAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'lastError' } }, + { kind: 'Field', name: { kind: 'Name', value: 'lockAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'lockBy' } }, + { kind: 'Field', name: { kind: 'Name', value: 'doneAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'priority' } }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; diff --git a/apps/webui/src/infra/routes/utils.ts b/apps/webui/src/infra/routes/utils.ts index af6a758..43aa8ad 100644 --- a/apps/webui/src/infra/routes/utils.ts +++ b/apps/webui/src/infra/routes/utils.ts @@ -1,6 +1,6 @@ import { guardRouteIndexAsNotFound } from '@/components/layout/app-not-found'; import type { RouteStateDataOption } from '@/infra/routes/traits'; -import { Outlet } from '@tanstack/react-router'; +import { Outlet, type RouteOptions } from '@tanstack/react-router'; export interface BuildVirtualBranchRouteOptions { title: string; @@ -8,7 +8,11 @@ export interface BuildVirtualBranchRouteOptions { export function buildVirtualBranchRouteOptions( options: BuildVirtualBranchRouteOptions -) { +): { + beforeLoad: RouteOptions['beforeLoad']; + staticData: RouteStateDataOption; + component: RouteOptions['component']; +} { return { beforeLoad: guardRouteIndexAsNotFound, staticData: { diff --git a/apps/webui/src/presentation/routeTree.gen.ts b/apps/webui/src/presentation/routeTree.gen.ts index a1c5873..2377fa0 100644 --- a/apps/webui/src/presentation/routeTree.gen.ts +++ b/apps/webui/src/presentation/routeTree.gen.ts @@ -31,11 +31,15 @@ import { Route as AppCredential3rdManageRouteImport } from './routes/_app/creden import { Route as AppCredential3rdCreateRouteImport } from './routes/_app/credential3rd/create' import { Route as AppBangumiManageRouteImport } from './routes/_app/bangumi/manage' import { Route as AppExploreExploreRouteImport } from './routes/_app/_explore/explore' +import { Route as AppTasksCronRouteRouteImport } from './routes/_app/tasks/cron/route' import { Route as AppTasksDetailIdRouteImport } from './routes/_app/tasks/detail.$id' +import { Route as AppTasksCronManageRouteImport } from './routes/_app/tasks/cron/manage' import { Route as AppSubscriptionsEditIdRouteImport } from './routes/_app/subscriptions/edit.$id' import { Route as AppSubscriptionsDetailIdRouteImport } from './routes/_app/subscriptions/detail.$id' import { Route as AppCredential3rdEditIdRouteImport } from './routes/_app/credential3rd/edit.$id' import { Route as AppCredential3rdDetailIdRouteImport } from './routes/_app/credential3rd/detail.$id' +import { Route as AppTasksCronEditIdRouteImport } from './routes/_app/tasks/cron/edit.$id' +import { Route as AppTasksCronDetailIdRouteImport } from './routes/_app/tasks/cron/detail.$id' const AboutRoute = AboutRouteImport.update({ id: '/about', @@ -148,11 +152,21 @@ const AppExploreExploreRoute = AppExploreExploreRouteImport.update({ path: '/explore', getParentRoute: () => AppRouteRoute, } as any) +const AppTasksCronRouteRoute = AppTasksCronRouteRouteImport.update({ + id: '/cron', + path: '/cron', + getParentRoute: () => AppTasksRouteRoute, +} as any) const AppTasksDetailIdRoute = AppTasksDetailIdRouteImport.update({ id: '/detail/$id', path: '/detail/$id', getParentRoute: () => AppTasksRouteRoute, } as any) +const AppTasksCronManageRoute = AppTasksCronManageRouteImport.update({ + id: '/manage', + path: '/manage', + getParentRoute: () => AppTasksCronRouteRoute, +} as any) const AppSubscriptionsEditIdRoute = AppSubscriptionsEditIdRouteImport.update({ id: '/edit/$id', path: '/edit/$id', @@ -175,6 +189,16 @@ const AppCredential3rdDetailIdRoute = path: '/detail/$id', getParentRoute: () => AppCredential3rdRouteRoute, } as any) +const AppTasksCronEditIdRoute = AppTasksCronEditIdRouteImport.update({ + id: '/edit/$id', + path: '/edit/$id', + getParentRoute: () => AppTasksCronRouteRoute, +} as any) +const AppTasksCronDetailIdRoute = AppTasksCronDetailIdRouteImport.update({ + id: '/detail/$id', + path: '/detail/$id', + getParentRoute: () => AppTasksCronRouteRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -189,6 +213,7 @@ export interface FileRoutesByFullPath { '/tasks': typeof AppTasksRouteRouteWithChildren '/auth/sign-in': typeof AuthSignInRoute '/auth/sign-up': typeof AuthSignUpRoute + '/tasks/cron': typeof AppTasksCronRouteRouteWithChildren '/explore': typeof AppExploreExploreRoute '/bangumi/manage': typeof AppBangumiManageRoute '/credential3rd/create': typeof AppCredential3rdCreateRoute @@ -203,7 +228,10 @@ export interface FileRoutesByFullPath { '/credential3rd/edit/$id': typeof AppCredential3rdEditIdRoute '/subscriptions/detail/$id': typeof AppSubscriptionsDetailIdRoute '/subscriptions/edit/$id': typeof AppSubscriptionsEditIdRoute + '/tasks/cron/manage': typeof AppTasksCronManageRoute '/tasks/detail/$id': typeof AppTasksDetailIdRoute + '/tasks/cron/detail/$id': typeof AppTasksCronDetailIdRoute + '/tasks/cron/edit/$id': typeof AppTasksCronEditIdRoute } export interface FileRoutesByTo { '/': typeof IndexRoute @@ -218,6 +246,7 @@ export interface FileRoutesByTo { '/tasks': typeof AppTasksRouteRouteWithChildren '/auth/sign-in': typeof AuthSignInRoute '/auth/sign-up': typeof AuthSignUpRoute + '/tasks/cron': typeof AppTasksCronRouteRouteWithChildren '/explore': typeof AppExploreExploreRoute '/bangumi/manage': typeof AppBangumiManageRoute '/credential3rd/create': typeof AppCredential3rdCreateRoute @@ -232,7 +261,10 @@ export interface FileRoutesByTo { '/credential3rd/edit/$id': typeof AppCredential3rdEditIdRoute '/subscriptions/detail/$id': typeof AppSubscriptionsDetailIdRoute '/subscriptions/edit/$id': typeof AppSubscriptionsEditIdRoute + '/tasks/cron/manage': typeof AppTasksCronManageRoute '/tasks/detail/$id': typeof AppTasksDetailIdRoute + '/tasks/cron/detail/$id': typeof AppTasksCronDetailIdRoute + '/tasks/cron/edit/$id': typeof AppTasksCronEditIdRoute } export interface FileRoutesById { __root__: typeof rootRouteImport @@ -248,6 +280,7 @@ export interface FileRoutesById { '/_app/tasks': typeof AppTasksRouteRouteWithChildren '/auth/sign-in': typeof AuthSignInRoute '/auth/sign-up': typeof AuthSignUpRoute + '/_app/tasks/cron': typeof AppTasksCronRouteRouteWithChildren '/_app/_explore/explore': typeof AppExploreExploreRoute '/_app/bangumi/manage': typeof AppBangumiManageRoute '/_app/credential3rd/create': typeof AppCredential3rdCreateRoute @@ -262,7 +295,10 @@ export interface FileRoutesById { '/_app/credential3rd/edit/$id': typeof AppCredential3rdEditIdRoute '/_app/subscriptions/detail/$id': typeof AppSubscriptionsDetailIdRoute '/_app/subscriptions/edit/$id': typeof AppSubscriptionsEditIdRoute + '/_app/tasks/cron/manage': typeof AppTasksCronManageRoute '/_app/tasks/detail/$id': typeof AppTasksDetailIdRoute + '/_app/tasks/cron/detail/$id': typeof AppTasksCronDetailIdRoute + '/_app/tasks/cron/edit/$id': typeof AppTasksCronEditIdRoute } export interface FileRouteTypes { fileRoutesByFullPath: FileRoutesByFullPath @@ -279,6 +315,7 @@ export interface FileRouteTypes { | '/tasks' | '/auth/sign-in' | '/auth/sign-up' + | '/tasks/cron' | '/explore' | '/bangumi/manage' | '/credential3rd/create' @@ -293,7 +330,10 @@ export interface FileRouteTypes { | '/credential3rd/edit/$id' | '/subscriptions/detail/$id' | '/subscriptions/edit/$id' + | '/tasks/cron/manage' | '/tasks/detail/$id' + | '/tasks/cron/detail/$id' + | '/tasks/cron/edit/$id' fileRoutesByTo: FileRoutesByTo to: | '/' @@ -308,6 +348,7 @@ export interface FileRouteTypes { | '/tasks' | '/auth/sign-in' | '/auth/sign-up' + | '/tasks/cron' | '/explore' | '/bangumi/manage' | '/credential3rd/create' @@ -322,7 +363,10 @@ export interface FileRouteTypes { | '/credential3rd/edit/$id' | '/subscriptions/detail/$id' | '/subscriptions/edit/$id' + | '/tasks/cron/manage' | '/tasks/detail/$id' + | '/tasks/cron/detail/$id' + | '/tasks/cron/edit/$id' id: | '__root__' | '/' @@ -337,6 +381,7 @@ export interface FileRouteTypes { | '/_app/tasks' | '/auth/sign-in' | '/auth/sign-up' + | '/_app/tasks/cron' | '/_app/_explore/explore' | '/_app/bangumi/manage' | '/_app/credential3rd/create' @@ -351,7 +396,10 @@ export interface FileRouteTypes { | '/_app/credential3rd/edit/$id' | '/_app/subscriptions/detail/$id' | '/_app/subscriptions/edit/$id' + | '/_app/tasks/cron/manage' | '/_app/tasks/detail/$id' + | '/_app/tasks/cron/detail/$id' + | '/_app/tasks/cron/edit/$id' fileRoutesById: FileRoutesById } export interface RootRouteChildren { @@ -520,6 +568,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AppExploreExploreRouteImport parentRoute: typeof AppRouteRoute } + '/_app/tasks/cron': { + id: '/_app/tasks/cron' + path: '/cron' + fullPath: '/tasks/cron' + preLoaderRoute: typeof AppTasksCronRouteRouteImport + parentRoute: typeof AppTasksRouteRoute + } '/_app/tasks/detail/$id': { id: '/_app/tasks/detail/$id' path: '/detail/$id' @@ -527,6 +582,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AppTasksDetailIdRouteImport parentRoute: typeof AppTasksRouteRoute } + '/_app/tasks/cron/manage': { + id: '/_app/tasks/cron/manage' + path: '/manage' + fullPath: '/tasks/cron/manage' + preLoaderRoute: typeof AppTasksCronManageRouteImport + parentRoute: typeof AppTasksCronRouteRoute + } '/_app/subscriptions/edit/$id': { id: '/_app/subscriptions/edit/$id' path: '/edit/$id' @@ -555,6 +617,20 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AppCredential3rdDetailIdRouteImport parentRoute: typeof AppCredential3rdRouteRoute } + '/_app/tasks/cron/edit/$id': { + id: '/_app/tasks/cron/edit/$id' + path: '/edit/$id' + fullPath: '/tasks/cron/edit/$id' + preLoaderRoute: typeof AppTasksCronEditIdRouteImport + parentRoute: typeof AppTasksCronRouteRoute + } + '/_app/tasks/cron/detail/$id': { + id: '/_app/tasks/cron/detail/$id' + path: '/detail/$id' + fullPath: '/tasks/cron/detail/$id' + preLoaderRoute: typeof AppTasksCronDetailIdRouteImport + parentRoute: typeof AppTasksCronRouteRoute + } } } @@ -630,12 +706,29 @@ const AppSubscriptionsRouteRouteWithChildren = AppSubscriptionsRouteRouteChildren, ) +interface AppTasksCronRouteRouteChildren { + AppTasksCronManageRoute: typeof AppTasksCronManageRoute + AppTasksCronDetailIdRoute: typeof AppTasksCronDetailIdRoute + AppTasksCronEditIdRoute: typeof AppTasksCronEditIdRoute +} + +const AppTasksCronRouteRouteChildren: AppTasksCronRouteRouteChildren = { + AppTasksCronManageRoute: AppTasksCronManageRoute, + AppTasksCronDetailIdRoute: AppTasksCronDetailIdRoute, + AppTasksCronEditIdRoute: AppTasksCronEditIdRoute, +} + +const AppTasksCronRouteRouteWithChildren = + AppTasksCronRouteRoute._addFileChildren(AppTasksCronRouteRouteChildren) + interface AppTasksRouteRouteChildren { + AppTasksCronRouteRoute: typeof AppTasksCronRouteRouteWithChildren AppTasksManageRoute: typeof AppTasksManageRoute AppTasksDetailIdRoute: typeof AppTasksDetailIdRoute } const AppTasksRouteRouteChildren: AppTasksRouteRouteChildren = { + AppTasksCronRouteRoute: AppTasksCronRouteRouteWithChildren, AppTasksManageRoute: AppTasksManageRoute, AppTasksDetailIdRoute: AppTasksDetailIdRoute, } diff --git a/apps/webui/src/presentation/routes/_app/credential3rd/create.tsx b/apps/webui/src/presentation/routes/_app/credential3rd/create.tsx index aab46a0..4c0250e 100644 --- a/apps/webui/src/presentation/routes/_app/credential3rd/create.tsx +++ b/apps/webui/src/presentation/routes/_app/credential3rd/create.tsx @@ -6,6 +6,7 @@ import { CardHeader, CardTitle, } from '@/components/ui/card'; +import { ContainerHeader } from '@/components/ui/container-header'; import { FormFieldErrors } from '@/components/ui/form-field-errors'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; @@ -123,14 +124,11 @@ function CredentialCreateRouteComponent() { return (
-
-
-

Create third-party credential

-

- Add new third-party login credential -

-
-
+ diff --git a/apps/webui/src/presentation/routes/_app/credential3rd/detail.$id.tsx b/apps/webui/src/presentation/routes/_app/credential3rd/detail.$id.tsx index e3fa6ff..ecf2f33 100644 --- a/apps/webui/src/presentation/routes/_app/credential3rd/detail.$id.tsx +++ b/apps/webui/src/presentation/routes/_app/credential3rd/detail.$id.tsx @@ -8,6 +8,7 @@ import { CardHeader, CardTitle, } from '@/components/ui/card'; +import { ContainerHeader } from '@/components/ui/container-header'; import { DetailEmptyView } from '@/components/ui/detail-empty-view'; import { Dialog, DialogTrigger } from '@/components/ui/dialog'; import { Label } from '@/components/ui/label'; @@ -17,14 +18,9 @@ import { GET_CREDENTIAL_3RD_DETAIL } from '@/domains/recorder/schema/credential3 import type { GetCredential3rdDetailQuery } from '@/infra/graphql/gql/graphql'; import type { RouteStateDataOption } from '@/infra/routes/traits'; import { useQuery } from '@apollo/client'; -import { - createFileRoute, - useCanGoBack, - useNavigate, - useRouter, -} from '@tanstack/react-router'; +import { createFileRoute, useNavigate } from '@tanstack/react-router'; import { format } from 'date-fns/format'; -import { ArrowLeft, CheckIcon, Edit, Eye, EyeOff } from 'lucide-react'; +import { CheckIcon, Edit, Eye, EyeOff } from 'lucide-react'; import { useState } from 'react'; import { Credential3rdCheckAvailableViewDialogContent } from './-check-available'; @@ -38,21 +34,9 @@ export const Route = createFileRoute('/_app/credential3rd/detail/$id')({ function Credential3rdDetailRouteComponent() { const { id } = Route.useParams(); const navigate = useNavigate(); - const router = useRouter(); - const canGoBack = useCanGoBack(); const [showPassword, setShowPassword] = useState(false); - const handleBack = () => { - if (canGoBack) { - router.history.back(); - } else { - navigate({ - to: '/credential3rd/manage', - }); - } - }; - const { loading, error, data } = useQuery( GET_CREDENTIAL_3RD_DETAIL, { @@ -91,31 +75,17 @@ function Credential3rdDetailRouteComponent() { return (
-
-
- -
-

Credential detail

-

- View credential #{credential.id} -

-
-
- -
+ Edit -
-
+ } + /> diff --git a/apps/webui/src/presentation/routes/_app/credential3rd/edit.$id.tsx b/apps/webui/src/presentation/routes/_app/credential3rd/edit.$id.tsx index dd8e42f..e9f90ef 100644 --- a/apps/webui/src/presentation/routes/_app/credential3rd/edit.$id.tsx +++ b/apps/webui/src/presentation/routes/_app/credential3rd/edit.$id.tsx @@ -8,6 +8,7 @@ import { CardHeader, CardTitle, } from '@/components/ui/card'; +import { ContainerHeader } from '@/components/ui/container-header'; import { DetailEmptyView } from '@/components/ui/detail-empty-view'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; @@ -39,13 +40,8 @@ import type { } from '@/infra/graphql/gql/graphql'; import type { RouteStateDataOption } from '@/infra/routes/traits'; import { useMutation, useQuery } from '@apollo/client'; -import { - createFileRoute, - useCanGoBack, - useNavigate, - useRouter, -} from '@tanstack/react-router'; -import { ArrowLeft, Eye, EyeOff, Save, X } from 'lucide-react'; +import { createFileRoute } from '@tanstack/react-router'; +import { Eye, EyeOff, Save } from 'lucide-react'; import { useCallback, useState } from 'react'; import { toast } from 'sonner'; @@ -63,23 +59,10 @@ function FormView({ credential: Credential3rdDetailDto; onCompleted: VoidFunction; }) { - const navigate = useNavigate(); const [showPassword, setShowPassword] = useState(false); const togglePasswordVisibility = () => { setShowPassword((prev) => !prev); }; - const router = useRouter(); - const canGoBack = useCanGoBack(); - - const handleBack = () => { - if (canGoBack) { - router.history.back(); - } else { - navigate({ - to: '/credential3rd/manage', - }); - } - }; const [updateCredential, { loading: updating }] = useMutation< UpdateCredential3rdMutation, @@ -121,35 +104,17 @@ function FormView({ return (
-
-
- -
-

Credential edit

-

- Edit credential #{credential.id} -

-
-
- -
- + form.handleSubmit()} disabled={updating}> {updating ? 'Saving...' : 'Save'} -
-
+ } + /> diff --git a/apps/webui/src/presentation/routes/_app/credential3rd/manage.tsx b/apps/webui/src/presentation/routes/_app/credential3rd/manage.tsx index 5f36e35..9c7fa61 100644 --- a/apps/webui/src/presentation/routes/_app/credential3rd/manage.tsx +++ b/apps/webui/src/presentation/routes/_app/credential3rd/manage.tsx @@ -1,5 +1,6 @@ import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; +import { ContainerHeader } from '@/components/ui/container-header'; import { DataTablePagination } from '@/components/ui/data-table-pagination'; import { DataTableViewOptions } from '@/components/ui/data-table-view-options'; import { DialogTrigger } from '@/components/ui/dialog'; @@ -297,18 +298,16 @@ function CredentialManageRouteComponent() { return (
-
-
-

Credential 3rd Management

-

- Manage your third-party platform login credentials -

-
- -
+ navigate({ to: '/credential3rd/create' })}> + + Add Credential + + } + />
diff --git a/apps/webui/src/presentation/routes/_app/subscriptions/-sync.tsx b/apps/webui/src/presentation/routes/_app/subscriptions/-sync.tsx index 3015fbd..93ae935 100644 --- a/apps/webui/src/presentation/routes/_app/subscriptions/-sync.tsx +++ b/apps/webui/src/presentation/routes/_app/subscriptions/-sync.tsx @@ -122,6 +122,7 @@ export const SubscriptionSyncView = memo( export interface SubscriptionSyncDialogContentProps { id: number; onCancel?: VoidFunction; + isCron?: boolean; } export const SubscriptionSyncDialogContent = memo( diff --git a/apps/webui/src/presentation/routes/_app/subscriptions/create.tsx b/apps/webui/src/presentation/routes/_app/subscriptions/create.tsx index e7038d7..ec93236 100644 --- a/apps/webui/src/presentation/routes/_app/subscriptions/create.tsx +++ b/apps/webui/src/presentation/routes/_app/subscriptions/create.tsx @@ -6,6 +6,7 @@ import { CardHeader, CardTitle, } from '@/components/ui/card'; +import { ContainerHeader } from '@/components/ui/container-header'; import { FormFieldErrors } from '@/components/ui/form-field-errors'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; @@ -96,14 +97,11 @@ function SubscriptionCreateRouteComponent() { return (
-
-
-

Create Bangumi Subscription

-

- Add a new bangumi subscription source -

-
-
+ diff --git a/apps/webui/src/presentation/routes/_app/subscriptions/detail.$id.tsx b/apps/webui/src/presentation/routes/_app/subscriptions/detail.$id.tsx index 7c433a0..56e241d 100644 --- a/apps/webui/src/presentation/routes/_app/subscriptions/detail.$id.tsx +++ b/apps/webui/src/presentation/routes/_app/subscriptions/detail.$id.tsx @@ -8,6 +8,7 @@ import { CardHeader, CardTitle, } from '@/components/ui/card'; +import { ContainerHeader } from '@/components/ui/container-header'; import { DetailEmptyView } from '@/components/ui/detail-empty-view'; import { Dialog, DialogTrigger } from '@/components/ui/dialog'; import { Img } from '@/components/ui/img'; @@ -33,15 +34,9 @@ import { SubscriptionCategoryEnum, } from '@/infra/graphql/gql/graphql'; import { useMutation, useQuery } from '@apollo/client'; -import { - createFileRoute, - useCanGoBack, - useNavigate, - useRouter, -} from '@tanstack/react-router'; +import { createFileRoute, useNavigate } from '@tanstack/react-router'; import { format } from 'date-fns'; import { - ArrowLeft, Edit, ExternalLink, ListIcon, @@ -61,20 +56,8 @@ export const Route = createFileRoute('/_app/subscriptions/detail/$id')({ function SubscriptionDetailRouteComponent() { const { id } = Route.useParams(); const navigate = useNavigate(); - const router = useRouter(); - const canGoBack = useCanGoBack(); const subscriptionService = useInject(SubscriptionService); - const handleBack = () => { - if (canGoBack) { - router.history.back(); - } else { - navigate({ - to: '/subscriptions/manage', - }); - } - }; - const handleReload = async () => { const result = await refetch(); const error = getApolloQueryError(result); @@ -177,31 +160,16 @@ function SubscriptionDetailRouteComponent() { return (
-
-
- -
-

Subscription detail

-

- View subscription #{subscription.id} -

-
-
- -
+ Edit - {' '} -
-
+ + } + /> @@ -421,6 +389,79 @@ function SubscriptionDetailRouteComponent() {
+ +
+
+ +
+ + + + + + + +
+
+
+ {subscription.cron?.nodes && + subscription.cron.nodes.length > 0 ? ( + subscription.cron.nodes.map((task) => ( + + navigate({ + to: '/tasks/cron/detail/$id', + params: { + id: task.id.toString(), + }, + }) + } + > +
+
+ +
+ + + {task.id} + + +
+ {task.status} +
+
+
+ )) + ) : ( +
+ No associated crons now +
+ )} +
+
+
diff --git a/apps/webui/src/presentation/routes/_app/subscriptions/edit.$id.tsx b/apps/webui/src/presentation/routes/_app/subscriptions/edit.$id.tsx index dfa8ff1..fa38b13 100644 --- a/apps/webui/src/presentation/routes/_app/subscriptions/edit.$id.tsx +++ b/apps/webui/src/presentation/routes/_app/subscriptions/edit.$id.tsx @@ -8,6 +8,7 @@ import { CardHeader, CardTitle, } from '@/components/ui/card'; +import { ContainerHeader } from '@/components/ui/container-header'; import { DetailEmptyView } from '@/components/ui/detail-empty-view'; import { FormFieldErrors } from '@/components/ui/form-field-errors'; import { Input } from '@/components/ui/input'; @@ -44,8 +45,8 @@ import { } from '@/infra/graphql/gql/graphql'; import type { RouteStateDataOption } from '@/infra/routes/traits'; import { useMutation, useQuery } from '@apollo/client'; -import { createFileRoute, useNavigate } from '@tanstack/react-router'; -import { ArrowLeft, Save, X } from 'lucide-react'; +import { createFileRoute } from '@tanstack/react-router'; +import { Save } from 'lucide-react'; import { useCallback, useMemo } from 'react'; import { toast } from 'sonner'; import { Credential3rdSelectContent } from './-credential3rd-select'; @@ -68,16 +69,8 @@ function FormView({ subscription: SubscriptionDetailDto; onCompleted: VoidFunction; }) { - const navigate = useNavigate(); const subscriptionService = useInject(SubscriptionService); - const handleBack = () => { - navigate({ - to: '/subscriptions/detail/$id', - params: { id: subscription.id.toString() }, - }); - }; - const [updateSubscription, { loading: updating }] = useMutation< UpdateSubscriptionsMutation, UpdateSubscriptionsMutationVariables @@ -149,35 +142,17 @@ function FormView({ return (
-
-
- -
-

Subscription edit

-

- Edit subscription #{subscription.id} -

-
-
- -
- + form.handleSubmit()} disabled={updating}> {updating ? 'Saving...' : 'Save'} -
-
+ } + /> diff --git a/apps/webui/src/presentation/routes/_app/subscriptions/manage.tsx b/apps/webui/src/presentation/routes/_app/subscriptions/manage.tsx index 6571414..5d2d211 100644 --- a/apps/webui/src/presentation/routes/_app/subscriptions/manage.tsx +++ b/apps/webui/src/presentation/routes/_app/subscriptions/manage.tsx @@ -1,4 +1,5 @@ import { Button } from '@/components/ui/button'; +import { ContainerHeader } from '@/components/ui/container-header'; import { DataTablePagination } from '@/components/ui/data-table-pagination'; import { DataTableViewOptions } from '@/components/ui/data-table-view-options'; import { Dialog, DialogTrigger } from '@/components/ui/dialog'; @@ -277,16 +278,16 @@ function SubscriptionManageRouteComponent() { return (
-
-
-

Subscription Management

-

Manage your subscription

-
- -
+ navigate({ to: '/subscriptions/create' })}> + + Add Subscription + + } + />
diff --git a/apps/webui/src/presentation/routes/_app/tasks/cron/-status-badge.tsx b/apps/webui/src/presentation/routes/_app/tasks/cron/-status-badge.tsx new file mode 100644 index 0000000..689d65f --- /dev/null +++ b/apps/webui/src/presentation/routes/_app/tasks/cron/-status-badge.tsx @@ -0,0 +1,42 @@ +import { Badge } from '@/components/ui/badge'; +import { CronStatusEnum } from '@/infra/graphql/gql/graphql'; +import { AlertCircle, CheckCircle, Clock, Loader2 } from 'lucide-react'; + +export function getStatusBadge(status: CronStatusEnum) { + switch (status) { + case CronStatusEnum.Completed: + return ( + + + {status} + + ); + case CronStatusEnum.Running: + return ( + + + {status} + + ); + case CronStatusEnum.Failed: + return ( + + + {status} + + ); + case CronStatusEnum.Pending: + return ( + + + {status} + + ); + default: + return ( + + {status} + + ); + } +} diff --git a/apps/webui/src/presentation/routes/_app/tasks/cron/detail.$id.tsx b/apps/webui/src/presentation/routes/_app/tasks/cron/detail.$id.tsx new file mode 100644 index 0000000..ccfaa99 --- /dev/null +++ b/apps/webui/src/presentation/routes/_app/tasks/cron/detail.$id.tsx @@ -0,0 +1,9 @@ +import { createFileRoute } from '@tanstack/react-router' + +export const Route = createFileRoute('/_app/tasks/cron/detail/$id')({ + component: RouteComponent, +}) + +function RouteComponent() { + return
Hello "/_app/tasks/cron/detail/$id"!
+} diff --git a/apps/webui/src/presentation/routes/_app/tasks/cron/edit.$id.tsx b/apps/webui/src/presentation/routes/_app/tasks/cron/edit.$id.tsx new file mode 100644 index 0000000..8df83e6 --- /dev/null +++ b/apps/webui/src/presentation/routes/_app/tasks/cron/edit.$id.tsx @@ -0,0 +1,9 @@ +import { createFileRoute } from '@tanstack/react-router' + +export const Route = createFileRoute('/_app/tasks/cron/edit/$id')({ + component: RouteComponent, +}) + +function RouteComponent() { + return
Hello "/_app/tasks/cron/edit/$id"!
+} diff --git a/apps/webui/src/presentation/routes/_app/tasks/cron/manage.tsx b/apps/webui/src/presentation/routes/_app/tasks/cron/manage.tsx new file mode 100644 index 0000000..4b7b60e --- /dev/null +++ b/apps/webui/src/presentation/routes/_app/tasks/cron/manage.tsx @@ -0,0 +1,306 @@ +import { Badge } from '@/components/ui/badge'; +import { Button } from '@/components/ui/button'; +import { ContainerHeader } from '@/components/ui/container-header'; +import { DataTablePagination } from '@/components/ui/data-table-pagination'; +import { DetailEmptyView } from '@/components/ui/detail-empty-view'; +import { DropdownMenuItem } from '@/components/ui/dropdown-menu'; +import { DropdownMenuActions } from '@/components/ui/dropdown-menu-actions'; +import { QueryErrorView } from '@/components/ui/query-error-view'; +import { Skeleton } from '@/components/ui/skeleton'; +import { + type CronDto, + DELETE_CRONS, + GET_CRONS, +} from '@/domains/recorder/schema/cron'; +import { + apolloErrorToMessage, + getApolloQueryError, +} from '@/infra/errors/apollo'; +import { + CronStatusEnum, + type DeleteCronsMutation, + type DeleteCronsMutationVariables, + type GetCronsQuery, + type GetCronsQueryVariables, +} from '@/infra/graphql/gql/graphql'; +import type { RouteStateDataOption } from '@/infra/routes/traits'; +import { useDebouncedSkeleton } from '@/presentation/hooks/use-debounded-skeleton'; +import { useMutation, useQuery } from '@apollo/client'; +import { createFileRoute, useNavigate } from '@tanstack/react-router'; +import { + type ColumnDef, + type PaginationState, + type SortingState, + type VisibilityState, + getCoreRowModel, + getPaginationRowModel, + useReactTable, +} from '@tanstack/react-table'; +import { format } from 'date-fns'; +import { RefreshCw } from 'lucide-react'; +import { useMemo, useState } from 'react'; +import { toast } from 'sonner'; +import { getStatusBadge } from './-status-badge'; + +export const Route = createFileRoute('/_app/tasks/cron/manage')({ + component: TaskCronManageRouteComponent, + staticData: { + breadcrumb: { label: 'Manage' }, + } satisfies RouteStateDataOption, +}); + +function TaskCronManageRouteComponent() { + const navigate = useNavigate(); + + const [columnVisibility, setColumnVisibility] = useState({}); + const [sorting, setSorting] = useState([]); + const [pagination, setPagination] = useState({ + pageIndex: 0, + pageSize: 10, + }); + + const { loading, error, data, refetch } = useQuery< + GetCronsQuery, + GetCronsQueryVariables + >(GET_CRONS, { + variables: { + pagination: { + page: { + page: pagination.pageIndex, + limit: pagination.pageSize, + }, + }, + filter: {}, + orderBy: { + nextRun: 'DESC', + }, + }, + pollInterval: 5000, // Auto-refresh every 5 seconds + }); + + const { showSkeleton } = useDebouncedSkeleton({ loading }); + + const crons = data?.cron; + + const [deleteCron] = useMutation< + DeleteCronsMutation, + DeleteCronsMutationVariables + >(DELETE_CRONS, { + onCompleted: async () => { + const refetchResult = await refetch(); + const error = getApolloQueryError(refetchResult); + if (error) { + toast.error('Failed to delete tasks', { + description: apolloErrorToMessage(error), + }); + return; + } + toast.success('Tasks deleted'); + }, + onError: (error) => { + toast.error('Failed to delete tasks', { + description: error.message, + }); + }, + }); + + const columns = useMemo(() => { + const cs: ColumnDef[] = [ + { + header: 'ID', + accessorKey: 'id', + cell: ({ row }) => { + return ( +
+ {row.original.id} +
+ ); + }, + }, + ]; + return cs; + }, []); + + const table = useReactTable({ + data: useMemo(() => (crons?.nodes ?? []) as CronDto[], [crons]), + columns, + getCoreRowModel: getCoreRowModel(), + getPaginationRowModel: getPaginationRowModel(), + onPaginationChange: setPagination, + onSortingChange: setSorting, + onColumnVisibilityChange: setColumnVisibility, + pageCount: crons?.paginationInfo?.pages, + rowCount: crons?.paginationInfo?.total, + enableColumnPinning: true, + autoResetPageIndex: true, + manualPagination: true, + state: { + pagination, + sorting, + columnVisibility, + }, + initialState: { + columnPinning: { + right: ['actions'], + }, + }, + }); + + if (error) { + return ; + } + + return ( +
+ refetch()} variant="outline" size="sm"> + + + } + /> + +
+ {showSkeleton && + Array.from(new Array(10)).map((_, index) => ( + + ))} + + {!showSkeleton && table.getRowModel().rows?.length > 0 ? ( + table.getRowModel().rows.map((row, index) => { + const cron = row.original; + return ( +
+ {/* Header with status and priority */} +
+
+ # {cron.id} +
+
+ + {cron.cronExpr} + +
+
+
+ {getStatusBadge(cron.status)} + Priority: {cron.priority} +
+ { + navigate({ + to: '/tasks/cron/detail/$id', + params: { id: cron.id.toString() }, + }); + }} + showDelete + onDelete={() => + deleteCron({ + variables: { + filter: { + id: { + eq: cron.id, + }, + }, + }, + }) + } + > + {cron.status === CronStatusEnum.Failed && ( + { + // TODO: Retry cron + }} + > + Retry + + )} + +
+
+ + {/* Time info */} +
+
+ Next run: + + {cron.nextRun + ? format(new Date(cron.nextRun), 'MM/dd HH:mm') + : '-'} + +
+ +
+ Last run: + + {cron.lastRun + ? format(new Date(cron.lastRun), 'MM/dd HH:mm') + : '-'} + +
+ + {/* Attempts */} +
+ Attempts: + + {cron.attempts} / {cron.maxAttempts} + +
+ + {/* Lock at */} +
+ Lock at: + + {cron.lockedAt + ? format(new Date(cron.lockedAt), 'MM/dd HH:mm') + : '-'} + +
+
+ + {/* Subscriber task cron */} + {cron.subscriberTaskCron && ( +
+ Task: +
+ +
+ )} + + {/* Error if exists */} + {cron.status === CronStatusEnum.Failed && cron.lastError && ( +
+ {cron.lastError} +
+ )} +
+ ); + }) + ) : ( + + )} +
+ + +
+ ); +} diff --git a/apps/webui/src/presentation/routes/_app/tasks/cron/route.tsx b/apps/webui/src/presentation/routes/_app/tasks/cron/route.tsx new file mode 100644 index 0000000..6794575 --- /dev/null +++ b/apps/webui/src/presentation/routes/_app/tasks/cron/route.tsx @@ -0,0 +1,8 @@ +import { buildVirtualBranchRouteOptions } from '@/infra/routes/utils'; +import { createFileRoute } from '@tanstack/react-router'; + +export const Route = createFileRoute('/_app/tasks/cron')( + buildVirtualBranchRouteOptions({ + title: 'Cron', + }) +); diff --git a/apps/webui/src/presentation/routes/_app/tasks/detail.$id.tsx b/apps/webui/src/presentation/routes/_app/tasks/detail.$id.tsx index 067e328..4cc8d53 100644 --- a/apps/webui/src/presentation/routes/_app/tasks/detail.$id.tsx +++ b/apps/webui/src/presentation/routes/_app/tasks/detail.$id.tsx @@ -8,6 +8,7 @@ import { CardHeader, CardTitle, } from '@/components/ui/card'; +import { ContainerHeader } from '@/components/ui/container-header'; import { DetailEmptyView } from '@/components/ui/detail-empty-view'; import { Label } from '@/components/ui/label'; import { QueryErrorView } from '@/components/ui/query-error-view'; @@ -24,14 +25,9 @@ import { } from '@/infra/graphql/gql/graphql'; import type { RouteStateDataOption } from '@/infra/routes/traits'; import { useMutation, useQuery } from '@apollo/client'; -import { - createFileRoute, - useCanGoBack, - useNavigate, - useRouter, -} from '@tanstack/react-router'; +import { createFileRoute } from '@tanstack/react-router'; import { format } from 'date-fns'; -import { ArrowLeft, RefreshCw } from 'lucide-react'; +import { RefreshCw } from 'lucide-react'; import { useMemo } from 'react'; import { toast } from 'sonner'; import { prettyTaskType } from './-pretty-task-type'; @@ -46,19 +42,6 @@ export const Route = createFileRoute('/_app/tasks/detail/$id')({ function TaskDetailRouteComponent() { const { id } = Route.useParams(); - const navigate = useNavigate(); - const router = useRouter(); - const canGoBack = useCanGoBack(); - - const handleBack = () => { - if (canGoBack) { - router.history.back(); - } else { - navigate({ - to: '/tasks/manage', - }); - } - }; const { data, loading, error, refetch } = useQuery< GetTasksQuery, @@ -129,27 +112,17 @@ function TaskDetailRouteComponent() { return (
-
-
- -
-

Task Detail

-

View task #{task.id}

-
-
- - -
+ } + /> diff --git a/apps/webui/src/presentation/routes/_app/tasks/manage.tsx b/apps/webui/src/presentation/routes/_app/tasks/manage.tsx index 1c94786..3c78016 100644 --- a/apps/webui/src/presentation/routes/_app/tasks/manage.tsx +++ b/apps/webui/src/presentation/routes/_app/tasks/manage.tsx @@ -15,6 +15,7 @@ import { type DeleteTasksMutation, type DeleteTasksMutationVariables, type GetTasksQuery, + type GetTasksQueryVariables, type RetryTasksMutation, type RetryTasksMutationVariables, SubscriberTaskStatusEnum, @@ -35,6 +36,7 @@ import { import { format } from 'date-fns'; import { RefreshCw } from 'lucide-react'; +import { ContainerHeader } from '@/components/ui/container-header'; import { DropdownMenuItem } from '@/components/ui/dropdown-menu'; import { apolloErrorToMessage, @@ -55,18 +57,17 @@ export const Route = createFileRoute('/_app/tasks/manage')({ function TaskManageRouteComponent() { const navigate = useNavigate(); - const [columnVisibility, setColumnVisibility] = useState({ - lockAt: false, - lockBy: false, - attempts: false, - }); + const [columnVisibility, setColumnVisibility] = useState({}); const [sorting, setSorting] = useState([]); const [pagination, setPagination] = useState({ pageIndex: 0, pageSize: 10, }); - const { loading, error, data, refetch } = useQuery(GET_TASKS, { + const { loading, error, data, refetch } = useQuery< + GetTasksQuery, + GetTasksQueryVariables + >(GET_TASKS, { variables: { pagination: { page: { @@ -172,16 +173,16 @@ function TaskManageRouteComponent() { } return ( -
-
-
-

Tasks Management

-

Manage your tasks

-
- -
+
+ refetch()} variant="outline" size="sm"> + + + } + />
{showSkeleton &&