From b4090e74c0062b8057bef7fb54fec83ad8089f5a Mon Sep 17 00:00:00 2001 From: lonelyhentxi Date: Sun, 29 Jun 2025 02:05:44 +0800 Subject: [PATCH] fix: fix webui compability --- apps/recorder/src/graphql/domains/bangumi.rs | 11 +- .../src/graphql/domains/credential_3rd.rs | 16 +- apps/recorder/src/graphql/domains/cron.rs | 60 +-- .../src/graphql/domains/downloaders.rs | 10 +- .../recorder/src/graphql/domains/downloads.rs | 10 +- apps/recorder/src/graphql/domains/episodes.rs | 10 +- apps/recorder/src/graphql/domains/feeds.rs | 12 +- .../src/graphql/domains/subscriber_tasks.rs | 108 +++--- .../src/graphql/domains/subscribers.rs | 27 +- .../graphql/domains/subscription_bangumi.rs | 8 +- .../graphql/domains/subscription_episode.rs | 8 +- .../src/graphql/domains/subscriptions.rs | 252 ++++++------- apps/recorder/src/graphql/infra/custom.rs | 108 +++++- apps/recorder/src/graphql/schema.rs | 3 + .../src/task/registry/subscriber/mod.rs | 3 + apps/webui/package.json | 11 +- apps/webui/rsbuild.config.ts | 15 +- .../domains/recorder/schema/credential3rd.ts | 18 +- .../src/domains/recorder/schema/feeds.ts | 4 +- .../domains/recorder/schema/subscriptions.ts | 14 +- .../src/domains/recorder/schema/tasks.ts | 12 +- apps/webui/src/infra/graphql/gql/gql.ts | 78 ++-- apps/webui/src/infra/graphql/gql/graphql.ts | 351 ++++++++++++++---- apps/webui/src/infra/routes/nav.ts | 10 +- .../_app/credential3rd/-check-available.tsx | 53 ++- .../routes/_app/credential3rd/edit.$id.tsx | 2 +- .../routes/_app/credential3rd/manage.tsx | 4 +- .../subscriptions/-credential3rd-select.tsx | 2 +- .../routes/_app/subscriptions/detail.$id.tsx | 2 +- .../routes/_app/subscriptions/edit.$id.tsx | 2 +- .../routes/_app/subscriptions/manage.tsx | 6 +- .../routes/_app/tasks/detail.$id.tsx | 4 +- .../presentation/routes/_app/tasks/manage.tsx | 6 +- apps/webui/src/presentation/routes/about.tsx | 2 +- pnpm-lock.yaml | 122 ++++++ tsconfig.base.json | 1 + 36 files changed, 867 insertions(+), 498 deletions(-) diff --git a/apps/recorder/src/graphql/domains/bangumi.rs b/apps/recorder/src/graphql/domains/bangumi.rs index d011b1f..1d9728a 100644 --- a/apps/recorder/src/graphql/domains/bangumi.rs +++ b/apps/recorder/src/graphql/domains/bangumi.rs @@ -1,6 +1,12 @@ use seaography::{Builder as SeaographyBuilder, BuilderContext}; -use crate::{graphql::domains::subscribers::restrict_subscriber_for_entity, models::bangumi}; +use crate::{ + graphql::{ + domains::subscribers::restrict_subscriber_for_entity, + infra::custom::register_entity_default_writable, + }, + models::bangumi, +}; pub fn register_bangumi_to_schema_context(context: &mut BuilderContext) { restrict_subscriber_for_entity::(context, &bangumi::Column::SubscriberId); @@ -8,7 +14,6 @@ pub fn register_bangumi_to_schema_context(context: &mut BuilderContext) { pub fn register_bangumi_to_schema_builder(mut builder: SeaographyBuilder) -> SeaographyBuilder { builder.register_enumeration::(); - seaography::register_entity!(builder, bangumi); - builder + register_entity_default_writable!(builder, bangumi, false) } diff --git a/apps/recorder/src/graphql/domains/credential_3rd.rs b/apps/recorder/src/graphql/domains/credential_3rd.rs index 745b732..0c2aff5 100644 --- a/apps/recorder/src/graphql/domains/credential_3rd.rs +++ b/apps/recorder/src/graphql/domains/credential_3rd.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use async_graphql::dynamic::{Field, FieldFuture, FieldValue, Object, TypeRef}; use sea_orm::{EntityTrait, QueryFilter}; -use seaography::{Builder as SeaographyBuilder, BuilderContext, get_filter_conditions}; +use seaography::{Builder as SeaographyBuilder, BuilderContext}; use serde::{Deserialize, Serialize}; use util_derive::DynamicGraphql; @@ -16,7 +16,7 @@ use crate::{ register_crypto_column_input_conversion_to_schema_context, register_crypto_column_output_conversion_to_schema_context, }, - custom::generate_entity_filtered_mutation_field, + custom::{generate_entity_filtered_mutation_field, register_entity_default_writable}, name::get_entity_custom_mutation_field_name, }, }, @@ -95,7 +95,7 @@ pub fn register_credential3rd_to_schema_builder( mut builder: SeaographyBuilder, ) -> SeaographyBuilder { builder.register_enumeration::(); - seaography::register_entity!(builder, credential_3rd); + builder = register_entity_default_writable!(builder, credential_3rd, false); builder.schema = builder .schema @@ -111,18 +111,12 @@ pub fn register_credential3rd_to_schema_builder( builder_context, check_available_mutation_name, TypeRef::named_nn(Credential3rdCheckAvailableInfo::object_type_name()), - Arc::new(|resolver_ctx, app_ctx, filters| { - let filters_condition = get_filter_conditions::( - resolver_ctx, - builder_context, - filters, - ); - + Arc::new(|_resolver_ctx, app_ctx, filters| { Box::pin(async move { let db = app_ctx.db(); let credential_model = credential_3rd::Entity::find() - .filter(filters_condition) + .filter(filters) .one(db) .await? .ok_or_else(|| { diff --git a/apps/recorder/src/graphql/domains/cron.rs b/apps/recorder/src/graphql/domains/cron.rs index 68f661b..67edeab 100644 --- a/apps/recorder/src/graphql/domains/cron.rs +++ b/apps/recorder/src/graphql/domains/cron.rs @@ -6,14 +6,7 @@ use crate::{ graphql::{ domains::subscribers::restrict_subscriber_for_entity, infra::{ - custom::{ - generate_entity_default_create_batch_mutation_field, - generate_entity_default_create_one_mutation_field, - generate_entity_default_delete_mutation_field, - generate_entity_default_insert_input_object, - generate_entity_default_update_input_object, - generate_entity_default_update_mutation_field, - }, + custom::register_entity_default_writable, json::{ convert_jsonb_output_case_for_entity, restrict_jsonb_filter_input_for_entity, validate_jsonb_input_for_entity, @@ -70,58 +63,9 @@ pub fn register_cron_to_schema_context(context: &mut BuilderContext) { } pub fn register_cron_to_schema_builder(mut builder: SeaographyBuilder) -> SeaographyBuilder { - builder.register_entity::( - ::iter() - .map(|rel| seaography::RelationBuilder::get_relation(&rel, builder.context)) - .collect(), - ); - builder = builder.register_entity_dataloader_one_to_one(cron::Entity, tokio::spawn); - builder = builder.register_entity_dataloader_one_to_many(cron::Entity, tokio::spawn); - builder.register_enumeration::(); - let builder_context = builder.context; - - { - builder - .inputs - .push(generate_entity_default_insert_input_object::( - builder_context, - )); - builder - .mutations - .push(generate_entity_default_create_one_mutation_field::< - cron::Entity, - _, - >(builder_context, true)); - builder - .mutations - .push(generate_entity_default_create_batch_mutation_field::< - cron::Entity, - _, - >(builder_context, true)); - } - { - builder - .inputs - .push(generate_entity_default_update_input_object::( - builder_context, - )); - builder - .mutations - .push(generate_entity_default_update_mutation_field::< - cron::Entity, - _, - >(builder_context, true)); - } - { - builder - .mutations - .push(generate_entity_default_delete_mutation_field::< - cron::Entity, - _, - >(builder_context, false)); - } + builder = register_entity_default_writable!(builder, cron, true); builder } diff --git a/apps/recorder/src/graphql/domains/downloaders.rs b/apps/recorder/src/graphql/domains/downloaders.rs index a797c56..b0f19c7 100644 --- a/apps/recorder/src/graphql/domains/downloaders.rs +++ b/apps/recorder/src/graphql/domains/downloaders.rs @@ -1,6 +1,12 @@ use seaography::{Builder as SeaographyBuilder, BuilderContext}; -use crate::{graphql::domains::subscribers::restrict_subscriber_for_entity, models::downloaders}; +use crate::{ + graphql::{ + domains::subscribers::restrict_subscriber_for_entity, + infra::custom::register_entity_default_writable, + }, + models::downloaders, +}; pub fn register_downloaders_to_schema_context(context: &mut BuilderContext) { restrict_subscriber_for_entity::( @@ -11,7 +17,7 @@ pub fn register_downloaders_to_schema_context(context: &mut BuilderContext) { pub fn register_downloaders_to_schema_builder(mut builder: SeaographyBuilder) -> SeaographyBuilder { builder.register_enumeration::(); - seaography::register_entity!(builder, downloaders); + builder = register_entity_default_writable!(builder, downloaders, false); builder } diff --git a/apps/recorder/src/graphql/domains/downloads.rs b/apps/recorder/src/graphql/domains/downloads.rs index 8fb1309..558bfac 100644 --- a/apps/recorder/src/graphql/domains/downloads.rs +++ b/apps/recorder/src/graphql/domains/downloads.rs @@ -1,6 +1,12 @@ use seaography::{Builder as SeaographyBuilder, BuilderContext}; -use crate::{graphql::domains::subscribers::restrict_subscriber_for_entity, models::downloads}; +use crate::{ + graphql::{ + domains::subscribers::restrict_subscriber_for_entity, + infra::custom::register_entity_default_writable, + }, + models::downloads, +}; pub fn register_downloads_to_schema_context(context: &mut BuilderContext) { restrict_subscriber_for_entity::(context, &downloads::Column::SubscriberId); @@ -9,7 +15,7 @@ pub fn register_downloads_to_schema_context(context: &mut BuilderContext) { pub fn register_downloads_to_schema_builder(mut builder: SeaographyBuilder) -> SeaographyBuilder { builder.register_enumeration::(); builder.register_enumeration::(); - seaography::register_entity!(builder, downloads); + builder = register_entity_default_writable!(builder, downloads, false); builder } diff --git a/apps/recorder/src/graphql/domains/episodes.rs b/apps/recorder/src/graphql/domains/episodes.rs index 9963710..aa311a4 100644 --- a/apps/recorder/src/graphql/domains/episodes.rs +++ b/apps/recorder/src/graphql/domains/episodes.rs @@ -1,6 +1,12 @@ use seaography::{Builder as SeaographyBuilder, BuilderContext}; -use crate::{graphql::domains::subscribers::restrict_subscriber_for_entity, models::episodes}; +use crate::{ + graphql::{ + domains::subscribers::restrict_subscriber_for_entity, + infra::custom::register_entity_default_writable, + }, + models::episodes, +}; pub fn register_episodes_to_schema_context(context: &mut BuilderContext) { restrict_subscriber_for_entity::(context, &episodes::Column::SubscriberId); @@ -8,7 +14,7 @@ pub fn register_episodes_to_schema_context(context: &mut BuilderContext) { pub fn register_episodes_to_schema_builder(mut builder: SeaographyBuilder) -> SeaographyBuilder { builder.register_enumeration::(); - seaography::register_entity!(builder, episodes); + builder = register_entity_default_writable!(builder, episodes, false); builder } diff --git a/apps/recorder/src/graphql/domains/feeds.rs b/apps/recorder/src/graphql/domains/feeds.rs index fe1ea20..c044c6a 100644 --- a/apps/recorder/src/graphql/domains/feeds.rs +++ b/apps/recorder/src/graphql/domains/feeds.rs @@ -7,9 +7,12 @@ use seaography::{Builder as SeaographyBuilder, BuilderContext, SeaResult}; use crate::{ graphql::{ domains::subscribers::restrict_subscriber_for_entity, - infra::name::{ - get_entity_and_column_name, get_entity_create_batch_mutation_field_name, - get_entity_create_one_mutation_field_name, + infra::{ + custom::register_entity_default_writable, + name::{ + get_entity_and_column_name, get_entity_create_batch_mutation_field_name, + get_entity_create_one_mutation_field_name, + }, }, }, models::feeds, @@ -45,7 +48,8 @@ pub fn register_feeds_to_schema_context(context: &mut BuilderContext) { pub fn register_feeds_to_schema_builder(mut builder: SeaographyBuilder) -> SeaographyBuilder { builder.register_enumeration::(); builder.register_enumeration::(); - seaography::register_entity!(builder, feeds); + + builder = register_entity_default_writable!(builder, feeds, false); builder } diff --git a/apps/recorder/src/graphql/domains/subscriber_tasks.rs b/apps/recorder/src/graphql/domains/subscriber_tasks.rs index b05a255..6aa3506 100644 --- a/apps/recorder/src/graphql/domains/subscriber_tasks.rs +++ b/apps/recorder/src/graphql/domains/subscriber_tasks.rs @@ -6,9 +6,7 @@ use sea_orm::{ ColumnTrait, ConnectionTrait, EntityTrait, Iterable, QueryFilter, QuerySelect, QueryTrait, prelude::Expr, sea_query::Query, }; -use seaography::{ - Builder as SeaographyBuilder, BuilderContext, GuardAction, get_filter_conditions, -}; +use seaography::{Builder as SeaographyBuilder, BuilderContext, GuardAction}; use crate::{ auth::AuthUserInfo, @@ -18,8 +16,9 @@ use crate::{ infra::{ custom::{ generate_entity_create_one_mutation_field, - generate_entity_default_insert_input_object, - generate_entity_filtered_mutation_field, + generate_entity_default_basic_entity_object, + generate_entity_default_insert_input_object, generate_entity_delete_mutation_field, + generate_entity_filtered_mutation_field, register_entity_default_readonly, }, json::{ convert_jsonb_output_case_for_entity, restrict_jsonb_filter_input_for_entity, @@ -31,7 +30,7 @@ use crate::{ get_entity_create_batch_mutation_field_name, get_entity_create_one_mutation_data_field_name, get_entity_create_one_mutation_field_name, get_entity_custom_mutation_field_name, - get_entity_delete_mutation_field_name, get_entity_update_mutation_field_name, + get_entity_update_mutation_field_name, }, }, }, @@ -186,79 +185,66 @@ pub fn register_subscriber_tasks_to_schema_context(context: &mut BuilderContext) pub fn register_subscriber_tasks_to_schema_builder( mut builder: SeaographyBuilder, ) -> SeaographyBuilder { - builder.register_entity::( - ::iter() - .map(|rel| seaography::RelationBuilder::get_relation(&rel, builder.context)) - .collect(), - ); - builder = builder.register_entity_dataloader_one_to_one(subscriber_tasks::Entity, tokio::spawn); - builder = - builder.register_entity_dataloader_one_to_many(subscriber_tasks::Entity, tokio::spawn); builder.register_enumeration::(); builder.register_enumeration::(); - let context = builder.context; + builder = register_entity_default_readonly!(builder, subscriber_tasks); + + let builder_context = builder.context; { - let delete_mutation = - generate_entity_filtered_mutation_field::( - context, - get_entity_delete_mutation_field_name::(context), - TypeRef::named_nn(TypeRef::INT), - Arc::new(|resolver_ctx, app_ctx, filters| { - let filters_condition = get_filter_conditions::( - resolver_ctx, - context, - filters, - ); - Box::pin(async move { - let db = app_ctx.db(); + builder + .outputs + .push(generate_entity_default_basic_entity_object::< + subscriber_tasks::Entity, + >(builder_context)); + } + { + let delete_mutation = generate_entity_delete_mutation_field::( + builder_context, + Arc::new(|_resolver_ctx, app_ctx, filters| { + Box::pin(async move { + let db = app_ctx.db(); - let select_subquery = subscriber_tasks::Entity::find() - .select_only() - .column(subscriber_tasks::Column::Id) - .filter(filters_condition); + let select_subquery = subscriber_tasks::Entity::find() + .select_only() + .column(subscriber_tasks::Column::Id) + .filter(filters); - let delete_query = Query::delete() - .from_table((ApalisSchema::Schema, ApalisJobs::Table)) - .and_where( - Expr::col(ApalisJobs::Id).in_subquery(select_subquery.into_query()), - ) - .to_owned(); + let delete_query = Query::delete() + .from_table((ApalisSchema::Schema, ApalisJobs::Table)) + .and_where( + Expr::col(ApalisJobs::Id).in_subquery(select_subquery.into_query()), + ) + .to_owned(); - let db_backend = db.deref().get_database_backend(); - let delete_statement = db_backend.build(&delete_query); + let db_backend = db.deref().get_database_backend(); + let delete_statement = db_backend.build(&delete_query); - let result = db.execute(delete_statement).await?; + let result = db.execute(delete_statement).await?; - Ok::<_, RecorderError>(Some(FieldValue::value( - result.rows_affected() as i32 - ))) - }) - }), - ); + Ok::<_, RecorderError>(result.rows_affected()) + }) + }), + ); builder.mutations.push(delete_mutation); } { - let entity_retry_one_mutation_name = - get_entity_custom_mutation_field_name::(context, "RetryOne"); + let entity_retry_one_mutation_name = get_entity_custom_mutation_field_name::< + subscriber_tasks::Entity, + >(builder_context, "RetryOne"); let retry_one_mutation = generate_entity_filtered_mutation_field::( - context, + builder_context, entity_retry_one_mutation_name, TypeRef::named_nn(get_entity_basic_type_name::( - context, + builder_context, )), - Arc::new(|resolver_ctx, app_ctx, filters| { - let filters_condition = get_filter_conditions::( - resolver_ctx, - context, - filters, - ); + Arc::new(|_resolver_ctx, app_ctx, filters| { Box::pin(async move { let db = app_ctx.db(); let job_id = subscriber_tasks::Entity::find() - .filter(filters_condition) + .filter(filters) .select_only() .column(subscriber_tasks::Column::Id) .into_tuple::() @@ -290,14 +276,14 @@ pub fn register_subscriber_tasks_to_schema_builder( .inputs .push(generate_entity_default_insert_input_object::< subscriber_tasks::Entity, - >(context)); + >(builder_context)); let create_one_mutation = generate_entity_create_one_mutation_field::( - context, + builder_context, None, Arc::new(|_resolver_ctx, app_ctx, input_object| { let job_column_name = get_column_name::( - context, + builder_context, &subscriber_tasks::Column::Job, ); let task = input_object diff --git a/apps/recorder/src/graphql/domains/subscribers.rs b/apps/recorder/src/graphql/domains/subscribers.rs index be20012..1682a78 100644 --- a/apps/recorder/src/graphql/domains/subscribers.rs +++ b/apps/recorder/src/graphql/domains/subscribers.rs @@ -12,13 +12,16 @@ use seaography::{ use crate::{ auth::{AuthError, AuthUserInfo}, - graphql::infra::name::{ - get_column_name, get_entity_and_column_name, - get_entity_create_batch_mutation_data_field_name, - get_entity_create_batch_mutation_field_name, - get_entity_create_one_mutation_data_field_name, get_entity_create_one_mutation_field_name, - get_entity_name, get_entity_update_mutation_data_field_name, - get_entity_update_mutation_field_name, + graphql::infra::{ + custom::register_entity_default_readonly, + name::{ + get_column_name, get_entity_and_column_name, + get_entity_create_batch_mutation_data_field_name, + get_entity_create_batch_mutation_field_name, + get_entity_create_one_mutation_data_field_name, + get_entity_create_one_mutation_field_name, get_entity_name, + get_entity_update_mutation_data_field_name, get_entity_update_mutation_field_name, + }, }, models::subscribers, }; @@ -325,15 +328,7 @@ pub fn register_subscribers_to_schema_builder(mut builder: SeaographyBuilder) -> .register(filter_types_map_helper.generate_filter_input(&SUBSCRIBER_ID_FILTER_INFO)); } - { - builder.register_entity::( - ::iter() - .map(|rel| seaography::RelationBuilder::get_relation(&rel, builder.context)) - .collect(), - ); - builder = builder.register_entity_dataloader_one_to_one(subscribers::Entity, tokio::spawn); - builder = builder.register_entity_dataloader_one_to_many(subscribers::Entity, tokio::spawn); - } + builder = register_entity_default_readonly!(builder, subscribers); builder } diff --git a/apps/recorder/src/graphql/domains/subscription_bangumi.rs b/apps/recorder/src/graphql/domains/subscription_bangumi.rs index b189835..3a18578 100644 --- a/apps/recorder/src/graphql/domains/subscription_bangumi.rs +++ b/apps/recorder/src/graphql/domains/subscription_bangumi.rs @@ -1,7 +1,11 @@ use seaography::{Builder as SeaographyBuilder, BuilderContext}; use crate::{ - graphql::domains::subscribers::restrict_subscriber_for_entity, models::subscription_bangumi, + graphql::{ + domains::subscribers::restrict_subscriber_for_entity, + infra::custom::register_entity_default_writable, + }, + models::subscription_bangumi, }; pub fn register_subscription_bangumi_to_schema_context(context: &mut BuilderContext) { @@ -14,7 +18,7 @@ pub fn register_subscription_bangumi_to_schema_context(context: &mut BuilderCont pub fn register_subscription_bangumi_to_schema_builder( mut builder: SeaographyBuilder, ) -> SeaographyBuilder { - seaography::register_entity!(builder, subscription_bangumi); + builder = register_entity_default_writable!(builder, subscription_bangumi, false); builder } diff --git a/apps/recorder/src/graphql/domains/subscription_episode.rs b/apps/recorder/src/graphql/domains/subscription_episode.rs index ed73a52..ce98638 100644 --- a/apps/recorder/src/graphql/domains/subscription_episode.rs +++ b/apps/recorder/src/graphql/domains/subscription_episode.rs @@ -1,7 +1,11 @@ use seaography::{Builder as SeaographyBuilder, BuilderContext}; use crate::{ - graphql::domains::subscribers::restrict_subscriber_for_entity, models::subscription_episode, + graphql::{ + domains::subscribers::restrict_subscriber_for_entity, + infra::custom::register_entity_default_writable, + }, + models::subscription_episode, }; pub fn register_subscription_episode_to_schema_context(context: &mut BuilderContext) { @@ -14,7 +18,7 @@ pub fn register_subscription_episode_to_schema_context(context: &mut BuilderCont pub fn register_subscription_episode_to_schema_builder( mut builder: SeaographyBuilder, ) -> SeaographyBuilder { - seaography::register_entity!(builder, subscription_episode); + builder = register_entity_default_writable!(builder, subscription_episode, false); builder } diff --git a/apps/recorder/src/graphql/domains/subscriptions.rs b/apps/recorder/src/graphql/domains/subscriptions.rs index 2718762..00bfeec 100644 --- a/apps/recorder/src/graphql/domains/subscriptions.rs +++ b/apps/recorder/src/graphql/domains/subscriptions.rs @@ -2,14 +2,14 @@ use std::sync::Arc; use async_graphql::dynamic::{FieldValue, TypeRef}; use sea_orm::{ColumnTrait, EntityTrait, QueryFilter}; -use seaography::{Builder as SeaographyBuilder, BuilderContext, get_filter_conditions}; +use seaography::{Builder as SeaographyBuilder, BuilderContext}; use crate::{ errors::RecorderError, graphql::{ domains::subscribers::restrict_subscriber_for_entity, infra::{ - custom::generate_entity_filtered_mutation_field, + custom::{generate_entity_filtered_mutation_field, register_entity_default_writable}, name::{get_entity_basic_type_name, get_entity_custom_mutation_field_name}, }, }, @@ -31,7 +31,7 @@ pub fn register_subscriptions_to_schema_builder( mut builder: SeaographyBuilder, ) -> SeaographyBuilder { builder.register_enumeration::(); - seaography::register_entity!(builder, subscriptions); + builder = register_entity_default_writable!(builder, subscriptions, false); let context = builder.context; @@ -40,55 +40,49 @@ pub fn register_subscriptions_to_schema_builder( subscriptions::Entity, >(context, "SyncOneFeedsIncremental"); - let sync_one_feeds_incremental_mutation = generate_entity_filtered_mutation_field::< - subscriptions::Entity, - _, - _, - >( - builder.context, - sync_one_feeds_incremental_mutation_name, - TypeRef::named_nn(get_entity_basic_type_name::( - context, - )), - Arc::new(|resolver_ctx, app_ctx, filters| { - let filters_condition = - get_filter_conditions::(resolver_ctx, context, filters); + let sync_one_feeds_incremental_mutation = + generate_entity_filtered_mutation_field::( + builder.context, + sync_one_feeds_incremental_mutation_name, + TypeRef::named_nn(get_entity_basic_type_name::( + context, + )), + Arc::new(|_resolver_ctx, app_ctx, filters| { + Box::pin(async move { + let db = app_ctx.db(); - Box::pin(async move { - let db = app_ctx.db(); + let subscription_model = subscriptions::Entity::find() + .filter(filters) + .one(db) + .await? + .ok_or_else(|| { + RecorderError::from_entity_not_found::() + })?; - let subscription_model = subscriptions::Entity::find() - .filter(filters_condition) - .one(db) - .await? - .ok_or_else(|| { - RecorderError::from_entity_not_found::() - })?; + let task_service = app_ctx.task(); - let task_service = app_ctx.task(); + let task_id = task_service + .add_subscriber_task( + SyncOneSubscriptionFeedsIncrementalTask::builder() + .subscriber_id(subscription_model.subscriber_id) + .subscription_id(subscription_model.id) + .build() + .into(), + ) + .await?; - let task_id = task_service - .add_subscriber_task( - SyncOneSubscriptionFeedsIncrementalTask::builder() - .subscriber_id(subscription_model.subscriber_id) - .subscription_id(subscription_model.id) - .build() - .into(), - ) - .await?; + let task_model = subscriber_tasks::Entity::find() + .filter(subscriber_tasks::Column::Id.eq(task_id.to_string())) + .one(db) + .await? + .ok_or_else(|| { + RecorderError::from_entity_not_found::() + })?; - let task_model = subscriber_tasks::Entity::find() - .filter(subscriber_tasks::Column::Id.eq(task_id.to_string())) - .one(db) - .await? - .ok_or_else(|| { - RecorderError::from_entity_not_found::() - })?; - - Ok(Some(FieldValue::owned_any(task_model))) - }) - }), - ); + Ok(Some(FieldValue::owned_any(task_model))) + }) + }), + ); builder.mutations.push(sync_one_feeds_incremental_mutation); } @@ -96,55 +90,49 @@ pub fn register_subscriptions_to_schema_builder( let sync_one_feeds_full_mutation_name = get_entity_custom_mutation_field_name::< subscriptions::Entity, >(builder.context, "SyncOneFeedsFull"); - let sync_one_feeds_full_mutation = generate_entity_filtered_mutation_field::< - subscriptions::Entity, - _, - _, - >( - builder.context, - sync_one_feeds_full_mutation_name, - TypeRef::named_nn(get_entity_basic_type_name::( - context, - )), - Arc::new(|resolver_ctx, app_ctx, filters| { - let filters_condition = - get_filter_conditions::(resolver_ctx, context, filters); + let sync_one_feeds_full_mutation = + generate_entity_filtered_mutation_field::( + builder.context, + sync_one_feeds_full_mutation_name, + TypeRef::named_nn(get_entity_basic_type_name::( + context, + )), + Arc::new(|_resolver_ctx, app_ctx, filters| { + Box::pin(async move { + let db = app_ctx.db(); - Box::pin(async move { - let db = app_ctx.db(); + let subscription_model = subscriptions::Entity::find() + .filter(filters) + .one(db) + .await? + .ok_or_else(|| { + RecorderError::from_entity_not_found::() + })?; - let subscription_model = subscriptions::Entity::find() - .filter(filters_condition) - .one(db) - .await? - .ok_or_else(|| { - RecorderError::from_entity_not_found::() - })?; + let task_service = app_ctx.task(); - let task_service = app_ctx.task(); + let task_id = task_service + .add_subscriber_task( + SyncOneSubscriptionFeedsFullTask::builder() + .subscriber_id(subscription_model.subscriber_id) + .subscription_id(subscription_model.id) + .build() + .into(), + ) + .await?; - let task_id = task_service - .add_subscriber_task( - SyncOneSubscriptionFeedsFullTask::builder() - .subscriber_id(subscription_model.subscriber_id) - .subscription_id(subscription_model.id) - .build() - .into(), - ) - .await?; + let task_model = subscriber_tasks::Entity::find() + .filter(subscriber_tasks::Column::Id.eq(task_id.to_string())) + .one(db) + .await? + .ok_or_else(|| { + RecorderError::from_entity_not_found::() + })?; - let task_model = subscriber_tasks::Entity::find() - .filter(subscriber_tasks::Column::Id.eq(task_id.to_string())) - .one(db) - .await? - .ok_or_else(|| { - RecorderError::from_entity_not_found::() - })?; - - Ok(Some(FieldValue::owned_any(task_model))) - }) - }), - ); + Ok(Some(FieldValue::owned_any(task_model))) + }) + }), + ); builder.mutations.push(sync_one_feeds_full_mutation); } @@ -154,55 +142,49 @@ pub fn register_subscriptions_to_schema_builder( subscriptions::Entity, >(context, "SyncOneSources"); - let sync_one_sources_mutation = generate_entity_filtered_mutation_field::< - subscriptions::Entity, - _, - _, - >( - builder.context, - sync_one_sources_mutation_name, - TypeRef::named_nn(get_entity_basic_type_name::( - context, - )), - Arc::new(|resolver_ctx, app_ctx, filters| { - let filters_condition = - get_filter_conditions::(resolver_ctx, context, filters); + let sync_one_sources_mutation = + generate_entity_filtered_mutation_field::( + builder.context, + sync_one_sources_mutation_name, + TypeRef::named_nn(get_entity_basic_type_name::( + context, + )), + Arc::new(|_resolver_ctx, app_ctx, filters| { + Box::pin(async move { + let db = app_ctx.db(); - Box::pin(async move { - let db = app_ctx.db(); + let subscription_model = subscriptions::Entity::find() + .filter(filters) + .one(db) + .await? + .ok_or_else(|| { + RecorderError::from_entity_not_found::() + })?; - let subscription_model = subscriptions::Entity::find() - .filter(filters_condition) - .one(db) - .await? - .ok_or_else(|| { - RecorderError::from_entity_not_found::() - })?; + let task_service = app_ctx.task(); - let task_service = app_ctx.task(); + let task_id = task_service + .add_subscriber_task( + SyncOneSubscriptionSourcesTask::builder() + .subscriber_id(subscription_model.subscriber_id) + .subscription_id(subscription_model.id) + .build() + .into(), + ) + .await?; - let task_id = task_service - .add_subscriber_task( - SyncOneSubscriptionSourcesTask::builder() - .subscriber_id(subscription_model.subscriber_id) - .subscription_id(subscription_model.id) - .build() - .into(), - ) - .await?; + let task_model = subscriber_tasks::Entity::find() + .filter(subscriber_tasks::Column::Id.eq(task_id.to_string())) + .one(db) + .await? + .ok_or_else(|| { + RecorderError::from_entity_not_found::() + })?; - let task_model = subscriber_tasks::Entity::find() - .filter(subscriber_tasks::Column::Id.eq(task_id.to_string())) - .one(db) - .await? - .ok_or_else(|| { - RecorderError::from_entity_not_found::() - })?; - - Ok(Some(FieldValue::owned_any(task_model))) - }) - }), - ); + Ok(Some(FieldValue::owned_any(task_model))) + }) + }), + ); builder.mutations.push(sync_one_sources_mutation); } diff --git a/apps/recorder/src/graphql/infra/custom.rs b/apps/recorder/src/graphql/infra/custom.rs index 36d35ed..bda5e25 100644 --- a/apps/recorder/src/graphql/infra/custom.rs +++ b/apps/recorder/src/graphql/infra/custom.rs @@ -1,14 +1,15 @@ -use std::{pin::Pin, sync::Arc}; +use std::{iter::FusedIterator, pin::Pin, sync::Arc}; use async_graphql::dynamic::{ Field, FieldFuture, FieldValue, InputObject, InputValue, Object, ObjectAccessor, - ResolverContext, TypeRef, ValueAccessor, + ResolverContext, TypeRef, }; use sea_orm::{ ActiveModelTrait, Condition, EntityTrait, IntoActiveModel, QueryFilter, TransactionTrait, }; use seaography::{ - BuilderContext, GuardAction, SeaographyError, get_filter_conditions, prepare_active_model, + Builder as SeaographyBuilder, BuilderContext, GuardAction, RelationBuilder, SeaographyError, + get_filter_conditions, prepare_active_model, }; use crate::{ @@ -31,7 +32,7 @@ pub type FilterMutationFn = Arc< dyn for<'a> Fn( &ResolverContext<'a>, Arc, - Option>, + Condition, ) -> Pin< Box>>> + Send + 'a>, > + Send @@ -156,6 +157,8 @@ where let filters = ctx.args.get(get_entity_renormalized_filter_field_name()); + let filters = get_filter_conditions::(&ctx, builder_context, filters); + let result = mutation_fn(&ctx, app_ctx.clone(), filters) .await .map_err(async_graphql::Error::new_with_source)?; @@ -791,3 +794,100 @@ where generate_entity_default_delete_mutation_fn::(builder_context, active_model_hooks), ) } + +pub fn register_entity_default_mutations( + mut builder: SeaographyBuilder, + active_model_hooks: bool, +) -> SeaographyBuilder +where + E: EntityTrait, + ::Model: Sync + IntoActiveModel, + A: ActiveModelTrait + sea_orm::ActiveModelBehavior + std::marker::Send + 'static, +{ + builder + .outputs + .push(generate_entity_default_basic_entity_object::( + builder.context, + )); + + builder.inputs.extend([ + generate_entity_default_insert_input_object::(builder.context), + generate_entity_default_update_input_object::(builder.context), + ]); + + builder.mutations.extend([ + generate_entity_default_create_one_mutation_field::( + builder.context, + active_model_hooks, + ), + generate_entity_default_create_batch_mutation_field::( + builder.context, + active_model_hooks, + ), + generate_entity_default_update_mutation_field::(builder.context, active_model_hooks), + generate_entity_default_delete_mutation_field::(builder.context, active_model_hooks), + ]); + + builder +} + +pub(crate) fn register_entity_default_readonly_impl( + mut builder: SeaographyBuilder, + entity: T, +) -> SeaographyBuilder +where + T: EntityTrait, + ::Model: Sync, + RE: sea_orm::Iterable + RelationBuilder, + I: Iterator + Clone + DoubleEndedIterator + ExactSizeIterator + FusedIterator, +{ + builder.register_entity::( + ::iter() + .map(|rel| RelationBuilder::get_relation(&rel, builder.context)) + .collect(), + ); + builder = builder.register_entity_dataloader_one_to_one(entity, tokio::spawn); + builder = builder.register_entity_dataloader_one_to_many(entity, tokio::spawn); + builder +} + +pub(crate) fn register_entity_default_writable_impl( + mut builder: SeaographyBuilder, + entity: T, + active_model_hooks: bool, +) -> SeaographyBuilder +where + T: EntityTrait, + ::Model: Sync + IntoActiveModel, + A: ActiveModelTrait + sea_orm::ActiveModelBehavior + std::marker::Send + 'static, + RE: sea_orm::Iterable + RelationBuilder, + I: Iterator + Clone + DoubleEndedIterator + ExactSizeIterator + FusedIterator, +{ + builder = register_entity_default_readonly_impl::(builder, entity); + builder = register_entity_default_mutations::(builder, active_model_hooks); + builder +} + +macro_rules! register_entity_default_readonly { + ($builder:expr, $module_path:ident) => { + $crate::graphql::infra::custom::register_entity_default_readonly_impl::< + $module_path::Entity, + $module_path::RelatedEntity, + _, + >($builder, $module_path::Entity) + }; +} + +macro_rules! register_entity_default_writable { + ($builder:expr, $module_path:ident, $active_model_hooks:expr) => { + $crate::graphql::infra::custom::register_entity_default_writable_impl::< + $module_path::Entity, + $module_path::RelatedEntity, + $module_path::ActiveModel, + _, + >($builder, $module_path::Entity, $active_model_hooks) + }; +} + +pub(crate) use register_entity_default_readonly; +pub(crate) use register_entity_default_writable; diff --git a/apps/recorder/src/graphql/schema.rs b/apps/recorder/src/graphql/schema.rs index d458f3e..c4e18cf 100644 --- a/apps/recorder/src/graphql/schema.rs +++ b/apps/recorder/src/graphql/schema.rs @@ -12,6 +12,7 @@ use crate::{ credential_3rd::{ register_credential3rd_to_schema_builder, register_credential3rd_to_schema_context, }, + cron::{register_cron_to_schema_builder, register_cron_to_schema_context}, downloaders::{ register_downloaders_to_schema_builder, register_downloaders_to_schema_context, }, @@ -77,6 +78,7 @@ pub fn build_schema( register_subscription_bangumi_to_schema_context(&mut context); register_subscription_episode_to_schema_context(&mut context); register_bangumi_to_schema_context(&mut context); + register_cron_to_schema_context(&mut context); } context }); @@ -100,6 +102,7 @@ pub fn build_schema( builder = register_credential3rd_to_schema_builder(builder); builder = register_subscriber_tasks_to_schema_builder(builder); builder = register_bangumi_to_schema_builder(builder); + builder = register_cron_to_schema_builder(builder); } let schema = builder.schema_builder(); diff --git a/apps/recorder/src/task/registry/subscriber/mod.rs b/apps/recorder/src/task/registry/subscriber/mod.rs index 186de04..2541e9a 100644 --- a/apps/recorder/src/task/registry/subscriber/mod.rs +++ b/apps/recorder/src/task/registry/subscriber/mod.rs @@ -23,6 +23,7 @@ macro_rules! register_subscriber_task_types { $(#[$task_enum_meta:meta])* pub enum $task_enum_name:ident { $( + $(#[$task_variant_meta:meta])* $task_variant:ident($task_type:ty) ),* $(,)? } @@ -44,6 +45,8 @@ macro_rules! register_subscriber_task_types { #[serde(tag = "task_type")] pub enum $task_enum_name { $( + $(#[$task_variant_meta])* + #[serde(rename = $string_value)] $task_variant($task_type), )* } diff --git a/apps/webui/package.json b/apps/webui/package.json index 92d2303..d87bca4 100644 --- a/apps/webui/package.json +++ b/apps/webui/package.json @@ -49,6 +49,7 @@ "@rsbuild/plugin-react": "^1.3.2", "@tanstack/react-form": "^1.12.3", "@tanstack/react-query": "^5.80.7", + "@tanstack/react-router": "^1.121.2", "@tanstack/react-table": "^8.21.3", "@tanstack/store": "^0.7.1", "arktype": "^2.1.20", @@ -76,8 +77,7 @@ "tailwindcss": "^4.1.10", "tw-animate-css": "^1.3.4", "type-fest": "^4.41.0", - "vaul": "^1.1.2", - "@tanstack/react-router": "^1.121.2" + "vaul": "^1.1.2" }, "devDependencies": { "@graphql-codegen/cli": "^5.0.7", @@ -86,13 +86,14 @@ "@graphql-typed-document-node/core": "^3.2.0", "@parcel/watcher": "^2.5.1", "@rsbuild/core": "^1.3.22", + "@rsbuild/plugin-type-check": "^1.2.3", "@tailwindcss/postcss": "^4.1.10", + "@tanstack/router-devtools": "^1.121.5", + "@tanstack/router-plugin": "^1.121.4", "@types/react": "^19.1.8", "@types/react-dom": "^19.1.6", "chalk": "^5.4.1", "commander": "^14.0.0", - "postcss": "^8.5.5", - "@tanstack/router-devtools": "^1.121.5", - "@tanstack/router-plugin": "^1.121.4" + "postcss": "^8.5.5" } } diff --git a/apps/webui/rsbuild.config.ts b/apps/webui/rsbuild.config.ts index de65334..0efec8f 100644 --- a/apps/webui/rsbuild.config.ts +++ b/apps/webui/rsbuild.config.ts @@ -1,13 +1,26 @@ import { defineConfig } from '@rsbuild/core'; import { pluginReact } from '@rsbuild/plugin-react'; +import { pluginTypeCheck } from '@rsbuild/plugin-type-check'; import { TanStackRouterRspack } from '@tanstack/router-plugin/rspack'; +const TS_NO_CHECK_REGEX = + /[\\/]node_modules[\\/]|[\\/]gql[\\/]|[\\/]components[\\/]ui[\\/]/; + export default defineConfig({ html: { title: 'Konobangu', favicon: './public/assets/favicon.ico', }, - plugins: [pluginReact()], + plugins: [ + pluginReact(), + pluginTypeCheck({ + tsCheckerOptions: { + issue: { + exclude: [({ file = '' }) => TS_NO_CHECK_REGEX.test(file)], + }, + }, + }), + ], tools: { rspack: { plugins: [ diff --git a/apps/webui/src/domains/recorder/schema/credential3rd.ts b/apps/webui/src/domains/recorder/schema/credential3rd.ts index 521ddb9..f69db71 100644 --- a/apps/webui/src/domains/recorder/schema/credential3rd.ts +++ b/apps/webui/src/domains/recorder/schema/credential3rd.ts @@ -7,8 +7,8 @@ import { gql } from '@apollo/client'; import { type } from 'arktype'; export const GET_CREDENTIAL_3RD = gql` - query GetCredential3rd($filters: Credential3rdFilterInput!, $orderBy: Credential3rdOrderInput, $pagination: PaginationInput) { - credential3rd(filters: $filters, orderBy: $orderBy, pagination: $pagination) { + query GetCredential3rd($filter: Credential3rdFilterInput!, $orderBy: Credential3rdOrderInput, $pagination: PaginationInput) { + credential3rd(filter: $filter, orderBy: $orderBy, pagination: $pagination) { nodes { id cookies @@ -43,8 +43,8 @@ export const INSERT_CREDENTIAL_3RD = gql` `; export const UPDATE_CREDENTIAL_3RD = gql` - mutation UpdateCredential3rd($data: Credential3rdUpdateInput!, $filters: Credential3rdFilterInput!) { - credential3rdUpdate(data: $data, filter: $filters) { + mutation UpdateCredential3rd($data: Credential3rdUpdateInput!, $filter: Credential3rdFilterInput!) { + credential3rdUpdate(data: $data, filter: $filter) { id cookies username @@ -58,14 +58,14 @@ export const UPDATE_CREDENTIAL_3RD = gql` `; export const DELETE_CREDENTIAL_3RD = gql` - mutation DeleteCredential3rd($filters: Credential3rdFilterInput!) { - credential3rdDelete(filter: $filters) + mutation DeleteCredential3rd($filter: Credential3rdFilterInput!) { + credential3rdDelete(filter: $filter) } `; export const GET_CREDENTIAL_3RD_DETAIL = gql` query GetCredential3rdDetail($id: Int!) { - credential3rd(filters: { id: { eq: $id } }) { + credential3rd(filter: { id: { eq: $id } }) { nodes { id cookies @@ -81,8 +81,8 @@ export const GET_CREDENTIAL_3RD_DETAIL = gql` `; export const CHECK_CREDENTIAL_3RD_AVAILABLE = gql` - query CheckCredential3rdAvailable($id: Int!) { - credential3rdCheckAvailable(filter: { id: $id }) { + mutation CheckCredential3rdAvailable($filter: Credential3rdFilterInput!) { + credential3rdCheckAvailable(filter: $filter) { available } } diff --git a/apps/webui/src/domains/recorder/schema/feeds.ts b/apps/webui/src/domains/recorder/schema/feeds.ts index f82c8f7..fc77f82 100644 --- a/apps/webui/src/domains/recorder/schema/feeds.ts +++ b/apps/webui/src/domains/recorder/schema/feeds.ts @@ -13,7 +13,7 @@ export const INSERT_FEED = gql` `; export const DELETE_FEED = gql` - mutation DeleteFeed($filters: FeedsFilterInput!) { - feedsDelete(filter: $filters) + mutation DeleteFeed($filter: FeedsFilterInput!) { + feedsDelete(filter: $filter) } `; diff --git a/apps/webui/src/domains/recorder/schema/subscriptions.ts b/apps/webui/src/domains/recorder/schema/subscriptions.ts index 158acec..1f19af6 100644 --- a/apps/webui/src/domains/recorder/schema/subscriptions.ts +++ b/apps/webui/src/domains/recorder/schema/subscriptions.ts @@ -14,10 +14,10 @@ import { } from './mikan'; export const GET_SUBSCRIPTIONS = gql` - query GetSubscriptions($filters: SubscriptionsFilterInput!, $orderBy: SubscriptionsOrderInput!, $pagination: PaginationInput!) { + query GetSubscriptions($filter: SubscriptionsFilterInput!, $orderBy: SubscriptionsOrderInput!, $pagination: PaginationInput!) { subscriptions( pagination: $pagination - filters: $filters + filter: $filter orderBy: $orderBy ) { nodes { @@ -59,11 +59,11 @@ export type SubscriptionDto = export const UPDATE_SUBSCRIPTIONS = gql` mutation UpdateSubscriptions( $data: SubscriptionsUpdateInput!, - $filters: SubscriptionsFilterInput!, + $filter: SubscriptionsFilterInput!, ) { subscriptionsUpdate ( data: $data - filter: $filters + filter: $filter ) { id createdAt @@ -77,14 +77,14 @@ export const UPDATE_SUBSCRIPTIONS = gql` `; export const DELETE_SUBSCRIPTIONS = gql` - mutation DeleteSubscriptions($filters: SubscriptionsFilterInput) { - subscriptionsDelete(filter: $filters) + mutation DeleteSubscriptions($filter: SubscriptionsFilterInput) { + subscriptionsDelete(filter: $filter) } `; export const GET_SUBSCRIPTION_DETAIL = gql` query GetSubscriptionDetail ($id: Int!) { - subscriptions(filters: { id: { + subscriptions(filter: { id: { eq: $id } }) { nodes { diff --git a/apps/webui/src/domains/recorder/schema/tasks.ts b/apps/webui/src/domains/recorder/schema/tasks.ts index 6f721cb..aba920a 100644 --- a/apps/webui/src/domains/recorder/schema/tasks.ts +++ b/apps/webui/src/domains/recorder/schema/tasks.ts @@ -7,10 +7,10 @@ import { type } from 'arktype'; import { SubscriptionSchema } from './subscriptions'; export const GET_TASKS = gql` - query GetTasks($filters: SubscriberTasksFilterInput!, $orderBy: SubscriberTasksOrderInput!, $pagination: PaginationInput!) { + query GetTasks($filter: SubscriberTasksFilterInput!, $orderBy: SubscriberTasksOrderInput!, $pagination: PaginationInput!) { subscriberTasks( pagination: $pagination - filters: $filters + filter: $filter orderBy: $orderBy ) { nodes { @@ -36,14 +36,14 @@ export const GET_TASKS = gql` `; export const DELETE_TASKS = gql` - mutation DeleteTasks($filters: SubscriberTasksFilterInput!) { - subscriberTasksDelete(filter: $filters) + mutation DeleteTasks($filter: SubscriberTasksFilterInput!) { + subscriberTasksDelete(filter: $filter) } `; export const RETRY_TASKS = gql` - mutation RetryTasks($filters: SubscriberTasksFilterInput!) { - subscriberTasksRetryOne(filter: $filters) { + mutation RetryTasks($filter: SubscriberTasksFilterInput!) { + subscriberTasksRetryOne(filter: $filter) { id, job, taskType, diff --git a/apps/webui/src/infra/graphql/gql/gql.ts b/apps/webui/src/infra/graphql/gql/gql.ts index 585f881..35e99e4 100644 --- a/apps/webui/src/infra/graphql/gql/gql.ts +++ b/apps/webui/src/infra/graphql/gql/gql.ts @@ -14,46 +14,46 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/ * Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size */ type Documents = { - "\n query GetCredential3rd($filters: Credential3rdFilterInput!, $orderBy: Credential3rdOrderInput, $pagination: PaginationInput) {\n credential3rd(filters: $filters, orderBy: $orderBy, pagination: $pagination) {\n nodes {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n": typeof types.GetCredential3rdDocument, + "\n query GetCredential3rd($filter: Credential3rdFilterInput!, $orderBy: Credential3rdOrderInput, $pagination: PaginationInput) {\n credential3rd(filter: $filter, orderBy: $orderBy, pagination: $pagination) {\n nodes {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n": typeof types.GetCredential3rdDocument, "\n mutation InsertCredential3rd($data: Credential3rdInsertInput!) {\n credential3rdCreateOne(data: $data) {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n }\n": typeof types.InsertCredential3rdDocument, - "\n mutation UpdateCredential3rd($data: Credential3rdUpdateInput!, $filters: Credential3rdFilterInput!) {\n credential3rdUpdate(data: $data, filter: $filters) {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n }\n": typeof types.UpdateCredential3rdDocument, - "\n mutation DeleteCredential3rd($filters: Credential3rdFilterInput!) {\n credential3rdDelete(filter: $filters)\n }\n": typeof types.DeleteCredential3rdDocument, - "\n query GetCredential3rdDetail($id: Int!) {\n credential3rd(filters: { 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 query CheckCredential3rdAvailable($id: Int!) {\n credential3rdCheckAvailable(filter: { id: $id }) {\n available\n }\n }\n": typeof types.CheckCredential3rdAvailableDocument, + "\n mutation UpdateCredential3rd($data: Credential3rdUpdateInput!, $filter: Credential3rdFilterInput!) {\n credential3rdUpdate(data: $data, filter: $filter) {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n }\n": typeof types.UpdateCredential3rdDocument, + "\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, "\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($filters: FeedsFilterInput!) {\n feedsDelete(filter: $filters)\n }\n": typeof types.DeleteFeedDocument, - "\n query GetSubscriptions($filters: SubscriptionsFilterInput!, $orderBy: SubscriptionsOrderInput!, $pagination: PaginationInput!) {\n subscriptions(\n pagination: $pagination\n filters: $filters\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 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 $filters: SubscriptionsFilterInput!,\n ) {\n subscriptionsUpdate (\n data: $data\n filter: $filters\n ) {\n id\n createdAt\n updatedAt\n displayName\n category\n sourceUrl\n enabled\n }\n}\n": typeof types.UpdateSubscriptionsDocument, - "\n mutation DeleteSubscriptions($filters: SubscriptionsFilterInput) {\n subscriptionsDelete(filter: $filters)\n }\n": typeof types.DeleteSubscriptionsDocument, - "\nquery GetSubscriptionDetail ($id: Int!) {\n subscriptions(filters: { id: {\n eq: $id\n } }) {\n nodes {\n id\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, + "\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 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, "\n mutation SyncSubscriptionFeedsIncremental($filter: SubscriptionsFilterInput!) {\n subscriptionsSyncOneFeedsIncremental(filter: $filter) {\n id\n }\n }\n": typeof types.SyncSubscriptionFeedsIncrementalDocument, "\n mutation SyncSubscriptionFeedsFull($filter: SubscriptionsFilterInput!) {\n subscriptionsSyncOneFeedsFull(filter: $filter) {\n id\n }\n }\n": typeof types.SyncSubscriptionFeedsFullDocument, "\n mutation SyncSubscriptionSources($filter: SubscriptionsFilterInput!) {\n subscriptionsSyncOneSources(filter: $filter) {\n id\n }\n }\n": typeof types.SyncSubscriptionSourcesDocument, - "\n query GetTasks($filters: SubscriberTasksFilterInput!, $orderBy: SubscriberTasksOrderInput!, $pagination: PaginationInput!) {\n subscriberTasks(\n pagination: $pagination\n filters: $filters\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 }\n paginationInfo {\n total\n pages\n }\n }\n }\n": typeof types.GetTasksDocument, - "\n mutation DeleteTasks($filters: SubscriberTasksFilterInput!) {\n subscriberTasksDelete(filter: $filters)\n }\n": typeof types.DeleteTasksDocument, - "\n mutation RetryTasks($filters: SubscriberTasksFilterInput!) {\n subscriberTasksRetryOne(filter: $filters) {\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 }\n }\n": typeof types.RetryTasksDocument, + "\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 }\n paginationInfo {\n total\n pages\n }\n }\n }\n": typeof types.GetTasksDocument, + "\n mutation DeleteTasks($filter: SubscriberTasksFilterInput!) {\n subscriberTasksDelete(filter: $filter)\n }\n": typeof types.DeleteTasksDocument, + "\n mutation RetryTasks($filter: SubscriberTasksFilterInput!) {\n subscriberTasksRetryOne(filter: $filter) {\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 }\n }\n": typeof types.RetryTasksDocument, }; const documents: Documents = { - "\n query GetCredential3rd($filters: Credential3rdFilterInput!, $orderBy: Credential3rdOrderInput, $pagination: PaginationInput) {\n credential3rd(filters: $filters, orderBy: $orderBy, pagination: $pagination) {\n nodes {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n": types.GetCredential3rdDocument, + "\n query GetCredential3rd($filter: Credential3rdFilterInput!, $orderBy: Credential3rdOrderInput, $pagination: PaginationInput) {\n credential3rd(filter: $filter, orderBy: $orderBy, pagination: $pagination) {\n nodes {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n": types.GetCredential3rdDocument, "\n mutation InsertCredential3rd($data: Credential3rdInsertInput!) {\n credential3rdCreateOne(data: $data) {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n }\n": types.InsertCredential3rdDocument, - "\n mutation UpdateCredential3rd($data: Credential3rdUpdateInput!, $filters: Credential3rdFilterInput!) {\n credential3rdUpdate(data: $data, filter: $filters) {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n }\n": types.UpdateCredential3rdDocument, - "\n mutation DeleteCredential3rd($filters: Credential3rdFilterInput!) {\n credential3rdDelete(filter: $filters)\n }\n": types.DeleteCredential3rdDocument, - "\n query GetCredential3rdDetail($id: Int!) {\n credential3rd(filters: { 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 query CheckCredential3rdAvailable($id: Int!) {\n credential3rdCheckAvailable(filter: { id: $id }) {\n available\n }\n }\n": types.CheckCredential3rdAvailableDocument, + "\n mutation UpdateCredential3rd($data: Credential3rdUpdateInput!, $filter: Credential3rdFilterInput!) {\n credential3rdUpdate(data: $data, filter: $filter) {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n }\n": types.UpdateCredential3rdDocument, + "\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, "\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($filters: FeedsFilterInput!) {\n feedsDelete(filter: $filters)\n }\n": types.DeleteFeedDocument, - "\n query GetSubscriptions($filters: SubscriptionsFilterInput!, $orderBy: SubscriptionsOrderInput!, $pagination: PaginationInput!) {\n subscriptions(\n pagination: $pagination\n filters: $filters\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 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 $filters: SubscriptionsFilterInput!,\n ) {\n subscriptionsUpdate (\n data: $data\n filter: $filters\n ) {\n id\n createdAt\n updatedAt\n displayName\n category\n sourceUrl\n enabled\n }\n}\n": types.UpdateSubscriptionsDocument, - "\n mutation DeleteSubscriptions($filters: SubscriptionsFilterInput) {\n subscriptionsDelete(filter: $filters)\n }\n": types.DeleteSubscriptionsDocument, - "\nquery GetSubscriptionDetail ($id: Int!) {\n subscriptions(filters: { id: {\n eq: $id\n } }) {\n nodes {\n id\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, + "\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 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, "\n mutation SyncSubscriptionFeedsIncremental($filter: SubscriptionsFilterInput!) {\n subscriptionsSyncOneFeedsIncremental(filter: $filter) {\n id\n }\n }\n": types.SyncSubscriptionFeedsIncrementalDocument, "\n mutation SyncSubscriptionFeedsFull($filter: SubscriptionsFilterInput!) {\n subscriptionsSyncOneFeedsFull(filter: $filter) {\n id\n }\n }\n": types.SyncSubscriptionFeedsFullDocument, "\n mutation SyncSubscriptionSources($filter: SubscriptionsFilterInput!) {\n subscriptionsSyncOneSources(filter: $filter) {\n id\n }\n }\n": types.SyncSubscriptionSourcesDocument, - "\n query GetTasks($filters: SubscriberTasksFilterInput!, $orderBy: SubscriberTasksOrderInput!, $pagination: PaginationInput!) {\n subscriberTasks(\n pagination: $pagination\n filters: $filters\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 }\n paginationInfo {\n total\n pages\n }\n }\n }\n": types.GetTasksDocument, - "\n mutation DeleteTasks($filters: SubscriberTasksFilterInput!) {\n subscriberTasksDelete(filter: $filters)\n }\n": types.DeleteTasksDocument, - "\n mutation RetryTasks($filters: SubscriberTasksFilterInput!) {\n subscriberTasksRetryOne(filter: $filters) {\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 }\n }\n": types.RetryTasksDocument, + "\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 }\n paginationInfo {\n total\n pages\n }\n }\n }\n": types.GetTasksDocument, + "\n mutation DeleteTasks($filter: SubscriberTasksFilterInput!) {\n subscriberTasksDelete(filter: $filter)\n }\n": types.DeleteTasksDocument, + "\n mutation RetryTasks($filter: SubscriberTasksFilterInput!) {\n subscriberTasksRetryOne(filter: $filter) {\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 }\n }\n": types.RetryTasksDocument, }; /** @@ -73,7 +73,7 @@ export function gql(source: string): unknown; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function gql(source: "\n query GetCredential3rd($filters: Credential3rdFilterInput!, $orderBy: Credential3rdOrderInput, $pagination: PaginationInput) {\n credential3rd(filters: $filters, orderBy: $orderBy, pagination: $pagination) {\n nodes {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n"): (typeof documents)["\n query GetCredential3rd($filters: Credential3rdFilterInput!, $orderBy: Credential3rdOrderInput, $pagination: PaginationInput) {\n credential3rd(filters: $filters, orderBy: $orderBy, pagination: $pagination) {\n nodes {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n"]; +export function gql(source: "\n query GetCredential3rd($filter: Credential3rdFilterInput!, $orderBy: Credential3rdOrderInput, $pagination: PaginationInput) {\n credential3rd(filter: $filter, orderBy: $orderBy, pagination: $pagination) {\n nodes {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n"): (typeof documents)["\n query GetCredential3rd($filter: Credential3rdFilterInput!, $orderBy: Credential3rdOrderInput, $pagination: PaginationInput) {\n credential3rd(filter: $filter, orderBy: $orderBy, pagination: $pagination) {\n nodes {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\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. */ @@ -81,19 +81,19 @@ export function gql(source: "\n mutation InsertCredential3rd($data: Credential3 /** * 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 UpdateCredential3rd($data: Credential3rdUpdateInput!, $filters: Credential3rdFilterInput!) {\n credential3rdUpdate(data: $data, filter: $filters) {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n }\n"): (typeof documents)["\n mutation UpdateCredential3rd($data: Credential3rdUpdateInput!, $filters: Credential3rdFilterInput!) {\n credential3rdUpdate(data: $data, filter: $filters) {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n }\n"]; +export function gql(source: "\n mutation UpdateCredential3rd($data: Credential3rdUpdateInput!, $filter: Credential3rdFilterInput!) {\n credential3rdUpdate(data: $data, filter: $filter) {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\n }\n }\n"): (typeof documents)["\n mutation UpdateCredential3rd($data: Credential3rdUpdateInput!, $filter: Credential3rdFilterInput!) {\n credential3rdUpdate(data: $data, filter: $filter) {\n id\n cookies\n username\n password\n userAgent\n createdAt\n updatedAt\n credentialType\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 DeleteCredential3rd($filters: Credential3rdFilterInput!) {\n credential3rdDelete(filter: $filters)\n }\n"): (typeof documents)["\n mutation DeleteCredential3rd($filters: Credential3rdFilterInput!) {\n credential3rdDelete(filter: $filters)\n }\n"]; +export function gql(source: "\n mutation DeleteCredential3rd($filter: Credential3rdFilterInput!) {\n credential3rdDelete(filter: $filter)\n }\n"): (typeof documents)["\n mutation DeleteCredential3rd($filter: Credential3rdFilterInput!) {\n credential3rdDelete(filter: $filter)\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 query GetCredential3rdDetail($id: Int!) {\n credential3rd(filters: { 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 documents)["\n query GetCredential3rdDetail($id: Int!) {\n credential3rd(filters: { 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"]; +export function gql(source: "\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 documents)["\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"]; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function gql(source: "\n query CheckCredential3rdAvailable($id: Int!) {\n credential3rdCheckAvailable(filter: { id: $id }) {\n available\n }\n }\n"): (typeof documents)["\n query CheckCredential3rdAvailable($id: Int!) {\n credential3rdCheckAvailable(filter: { id: $id }) {\n available\n }\n }\n"]; +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. */ @@ -101,11 +101,11 @@ export function gql(source: "\n mutation InsertFeed($data: FeedsInsertInput!) /** * 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 DeleteFeed($filters: FeedsFilterInput!) {\n feedsDelete(filter: $filters)\n }\n"): (typeof documents)["\n mutation DeleteFeed($filters: FeedsFilterInput!) {\n feedsDelete(filter: $filters)\n }\n"]; +export function gql(source: "\n mutation DeleteFeed($filter: FeedsFilterInput!) {\n feedsDelete(filter: $filter)\n }\n"): (typeof documents)["\n mutation DeleteFeed($filter: FeedsFilterInput!) {\n feedsDelete(filter: $filter)\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 query GetSubscriptions($filters: SubscriptionsFilterInput!, $orderBy: SubscriptionsOrderInput!, $pagination: PaginationInput!) {\n subscriptions(\n pagination: $pagination\n filters: $filters\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 documents)["\n query GetSubscriptions($filters: SubscriptionsFilterInput!, $orderBy: SubscriptionsOrderInput!, $pagination: PaginationInput!) {\n subscriptions(\n pagination: $pagination\n filters: $filters\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"]; +export function gql(source: "\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 documents)["\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"]; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -113,15 +113,15 @@ export function gql(source: "\n mutation InsertSubscription($data: Subscripti /** * 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 UpdateSubscriptions(\n $data: SubscriptionsUpdateInput!,\n $filters: SubscriptionsFilterInput!,\n ) {\n subscriptionsUpdate (\n data: $data\n filter: $filters\n ) {\n id\n createdAt\n updatedAt\n displayName\n category\n sourceUrl\n enabled\n }\n}\n"): (typeof documents)["\n mutation UpdateSubscriptions(\n $data: SubscriptionsUpdateInput!,\n $filters: SubscriptionsFilterInput!,\n ) {\n subscriptionsUpdate (\n data: $data\n filter: $filters\n ) {\n id\n createdAt\n updatedAt\n displayName\n category\n sourceUrl\n enabled\n }\n}\n"]; +export function gql(source: "\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 documents)["\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"]; /** * 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 DeleteSubscriptions($filters: SubscriptionsFilterInput) {\n subscriptionsDelete(filter: $filters)\n }\n"): (typeof documents)["\n mutation DeleteSubscriptions($filters: SubscriptionsFilterInput) {\n subscriptionsDelete(filter: $filters)\n }\n"]; +export function gql(source: "\n mutation DeleteSubscriptions($filter: SubscriptionsFilterInput) {\n subscriptionsDelete(filter: $filter)\n }\n"): (typeof documents)["\n mutation DeleteSubscriptions($filter: SubscriptionsFilterInput) {\n subscriptionsDelete(filter: $filter)\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 GetSubscriptionDetail ($id: Int!) {\n subscriptions(filters: { id: {\n eq: $id\n } }) {\n nodes {\n id\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(filters: { id: {\n eq: $id\n } }) {\n nodes {\n id\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 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 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"]; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -137,15 +137,15 @@ export function gql(source: "\n mutation SyncSubscriptionSources($filter: Subsc /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function gql(source: "\n query GetTasks($filters: SubscriberTasksFilterInput!, $orderBy: SubscriberTasksOrderInput!, $pagination: PaginationInput!) {\n subscriberTasks(\n pagination: $pagination\n filters: $filters\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 }\n paginationInfo {\n total\n pages\n }\n }\n }\n"): (typeof documents)["\n query GetTasks($filters: SubscriberTasksFilterInput!, $orderBy: SubscriberTasksOrderInput!, $pagination: PaginationInput!) {\n subscriberTasks(\n pagination: $pagination\n filters: $filters\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 }\n paginationInfo {\n total\n pages\n }\n }\n }\n"]; +export function gql(source: "\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 }\n paginationInfo {\n total\n pages\n }\n }\n }\n"): (typeof documents)["\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 }\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 DeleteTasks($filters: SubscriberTasksFilterInput!) {\n subscriberTasksDelete(filter: $filters)\n }\n"): (typeof documents)["\n mutation DeleteTasks($filters: SubscriberTasksFilterInput!) {\n subscriberTasksDelete(filter: $filters)\n }\n"]; +export function gql(source: "\n mutation DeleteTasks($filter: SubscriberTasksFilterInput!) {\n subscriberTasksDelete(filter: $filter)\n }\n"): (typeof documents)["\n mutation DeleteTasks($filter: SubscriberTasksFilterInput!) {\n subscriberTasksDelete(filter: $filter)\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 RetryTasks($filters: SubscriberTasksFilterInput!) {\n subscriberTasksRetryOne(filter: $filters) {\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 }\n }\n"): (typeof documents)["\n mutation RetryTasks($filters: SubscriberTasksFilterInput!) {\n subscriberTasksRetryOne(filter: $filters) {\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 }\n }\n"]; +export function gql(source: "\n mutation RetryTasks($filter: SubscriberTasksFilterInput!) {\n subscriberTasksRetryOne(filter: $filter) {\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 }\n }\n"): (typeof documents)["\n mutation RetryTasks($filter: SubscriberTasksFilterInput!) {\n subscriberTasksRetryOne(filter: $filter) {\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 }\n }\n"]; export function gql(source: string) { return (documents as any)[source] ?? {}; diff --git a/apps/webui/src/infra/graphql/gql/graphql.ts b/apps/webui/src/infra/graphql/gql/graphql.ts index 5156d26..7e8813e 100644 --- a/apps/webui/src/infra/graphql/gql/graphql.ts +++ b/apps/webui/src/infra/graphql/gql/graphql.ts @@ -46,21 +46,21 @@ export type Bangumi = { export type BangumiEpisodeArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type BangumiSubscriptionArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type BangumiSubscriptionBangumiArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; @@ -228,7 +228,7 @@ export type Credential3rd = { export type Credential3rdSubscriptionArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; @@ -252,11 +252,6 @@ export type Credential3rdCheckAvailableInfo = { available: Scalars['Boolean']['output']; }; -/** The input of the credential3rdCheckAvailable query */ -export type Credential3rdCheckAvailableInput = { - id: Scalars['Int']['input']; -}; - export type Credential3rdConnection = { __typename?: 'Credential3rdConnection'; edges: Array; @@ -338,6 +333,148 @@ export type Credential3rdUpdateInput = { username?: InputMaybe; }; +export type Cron = { + __typename?: 'Cron'; + attempts: Scalars['Int']['output']; + createdAt: Scalars['String']['output']; + cronExpr: Scalars['String']['output']; + enabled: Scalars['Boolean']['output']; + id: Scalars['Int']['output']; + lastError?: Maybe; + lastRun?: Maybe; + lockedAt?: Maybe; + lockedBy?: Maybe; + maxAttempts: Scalars['Int']['output']; + nextRun?: Maybe; + priority: Scalars['Int']['output']; + status: CronStatusEnum; + subscriber?: Maybe; + subscriberId?: Maybe; + subscriberTask?: Maybe; + subscription?: Maybe; + subscriptionId?: Maybe; + timeoutMs: Scalars['Int']['output']; + updatedAt: Scalars['String']['output']; +}; + +export type CronBasic = { + __typename?: 'CronBasic'; + attempts: Scalars['Int']['output']; + createdAt: Scalars['String']['output']; + cronExpr: Scalars['String']['output']; + enabled: Scalars['Boolean']['output']; + id: Scalars['Int']['output']; + lastError?: Maybe; + lastRun?: Maybe; + lockedAt?: Maybe; + lockedBy?: Maybe; + maxAttempts: Scalars['Int']['output']; + nextRun?: Maybe; + priority: Scalars['Int']['output']; + status: CronStatusEnum; + subscriberId?: Maybe; + subscriberTask?: Maybe; + subscriptionId?: Maybe; + timeoutMs: Scalars['Int']['output']; + updatedAt: Scalars['String']['output']; +}; + +export type CronConnection = { + __typename?: 'CronConnection'; + edges: Array; + nodes: Array; + pageInfo: PageInfo; + paginationInfo?: Maybe; +}; + +export type CronEdge = { + __typename?: 'CronEdge'; + cursor: Scalars['String']['output']; + node: Cron; +}; + +export type CronFilterInput = { + and?: InputMaybe>; + attempts?: InputMaybe; + createdAt?: InputMaybe; + cronExpr?: InputMaybe; + enabled?: InputMaybe; + id?: InputMaybe; + lastError?: InputMaybe; + lastRun?: InputMaybe; + lockedAt?: InputMaybe; + lockedBy?: InputMaybe; + maxAttempts?: InputMaybe; + nextRun?: InputMaybe; + or?: InputMaybe>; + priority?: InputMaybe; + status?: InputMaybe; + subscriberId?: InputMaybe; + subscriberTask?: InputMaybe; + subscriptionId?: InputMaybe; + timeoutMs?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type CronInsertInput = { + cronExpr: Scalars['String']['input']; + enabled?: InputMaybe; + id?: InputMaybe; + maxAttempts?: InputMaybe; + subscriberTask?: InputMaybe; + timeoutMs?: InputMaybe; +}; + +export type CronOrderInput = { + attempts?: InputMaybe; + createdAt?: InputMaybe; + cronExpr?: InputMaybe; + enabled?: InputMaybe; + id?: InputMaybe; + lastError?: InputMaybe; + lastRun?: InputMaybe; + lockedAt?: InputMaybe; + lockedBy?: InputMaybe; + maxAttempts?: InputMaybe; + nextRun?: InputMaybe; + priority?: InputMaybe; + status?: InputMaybe; + subscriberId?: InputMaybe; + subscriberTask?: InputMaybe; + subscriptionId?: InputMaybe; + timeoutMs?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export const CronStatusEnum = { + Completed: 'completed', + Failed: 'failed', + Pending: 'pending', + Running: 'running' +} as const; + +export type CronStatusEnum = typeof CronStatusEnum[keyof typeof CronStatusEnum]; +export type CronStatusEnumFilterInput = { + eq?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + is_in?: InputMaybe>; + is_not_in?: InputMaybe>; + is_not_null?: InputMaybe; + is_null?: InputMaybe; + lt?: InputMaybe; + lte?: InputMaybe; + ne?: InputMaybe; +}; + +export type CronUpdateInput = { + cronExpr?: InputMaybe; + enabled?: InputMaybe; + maxAttempts?: InputMaybe; + priority?: InputMaybe; + timeoutMs?: InputMaybe; +}; + export type CursorInput = { cursor?: InputMaybe; limit: Scalars['Int']['input']; @@ -421,7 +558,7 @@ export type Downloaders = { export type DownloadersDownloadArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; @@ -682,21 +819,21 @@ export type Episodes = { export type EpisodesDownloadArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type EpisodesSubscriptionArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type EpisodesSubscriptionEpisodeArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; @@ -990,10 +1127,15 @@ export type Mutation = { bangumiCreateOne: BangumiBasic; bangumiDelete: Scalars['Int']['output']; bangumiUpdate: Array; + credential3rdCheckAvailable: Credential3rdCheckAvailableInfo; credential3rdCreateBatch: Array; credential3rdCreateOne: Credential3rdBasic; credential3rdDelete: Scalars['Int']['output']; credential3rdUpdate: Array; + cronCreateBatch: Array; + cronCreateOne: CronBasic; + cronDelete: Scalars['Int']['output']; + cronUpdate: Array; downloadersCreateBatch: Array; downloadersCreateOne: DownloadersBasic; downloadersDelete: Scalars['Int']['output']; @@ -1010,8 +1152,9 @@ export type Mutation = { feedsCreateOne: FeedsBasic; feedsDelete: Scalars['Int']['output']; feedsUpdate: Array; + subscriberTasksCreateOne: SubscriberTasksBasic; subscriberTasksDelete: Scalars['Int']['output']; - subscriberTasksRetryOne: SubscriberTasks; + subscriberTasksRetryOne: SubscriberTasksBasic; subscriptionBangumiCreateBatch: Array; subscriptionBangumiCreateOne: SubscriptionBangumiBasic; subscriptionBangumiDelete: Scalars['Int']['output']; @@ -1023,9 +1166,9 @@ export type Mutation = { subscriptionsCreateBatch: Array; subscriptionsCreateOne: SubscriptionsBasic; subscriptionsDelete: Scalars['Int']['output']; - subscriptionsSyncOneFeedsFull: SubscriberTasks; - subscriptionsSyncOneFeedsIncremental: SubscriberTasks; - subscriptionsSyncOneSources: SubscriberTasks; + subscriptionsSyncOneFeedsFull: SubscriberTasksBasic; + subscriptionsSyncOneFeedsIncremental: SubscriberTasksBasic; + subscriptionsSyncOneSources: SubscriberTasksBasic; subscriptionsUpdate: Array; }; @@ -1051,6 +1194,11 @@ export type MutationBangumiUpdateArgs = { }; +export type MutationCredential3rdCheckAvailableArgs = { + filter?: InputMaybe; +}; + + export type MutationCredential3rdCreateBatchArgs = { data: Array; }; @@ -1072,6 +1220,27 @@ export type MutationCredential3rdUpdateArgs = { }; +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; }; @@ -1156,6 +1325,11 @@ export type MutationFeedsUpdateArgs = { }; +export type MutationSubscriberTasksCreateOneArgs = { + data: SubscriberTasksInsertInput; +}; + + export type MutationSubscriberTasksDeleteArgs = { filter?: InputMaybe; }; @@ -1286,7 +1460,7 @@ export type Query = { _sea_orm_entity_metadata?: Maybe; bangumi: BangumiConnection; credential3rd: Credential3rdConnection; - credential3rdCheckAvailable: Credential3rdCheckAvailableInfo; + cron: CronConnection; downloaders: DownloadersConnection; downloads: DownloadsConnection; episodes: EpisodesConnection; @@ -1305,82 +1479,84 @@ export type Query_Sea_Orm_Entity_MetadataArgs = { export type QueryBangumiArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type QueryCredential3rdArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; -export type QueryCredential3rdCheckAvailableArgs = { - filter: Credential3rdCheckAvailableInput; +export type QueryCronArgs = { + filter?: InputMaybe; + orderBy?: InputMaybe; + pagination?: InputMaybe; }; export type QueryDownloadersArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type QueryDownloadsArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type QueryEpisodesArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type QueryFeedsArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type QuerySubscriberTasksArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type QuerySubscribersArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type QuerySubscriptionBangumiArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type QuerySubscriptionEpisodeArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type QuerySubscriptionsArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; @@ -1446,6 +1622,24 @@ export type SubscriberTasks = { taskType: SubscriberTaskTypeEnum; }; +export type SubscriberTasksBasic = { + __typename?: 'SubscriberTasksBasic'; + attempts: Scalars['Int']['output']; + doneAt?: Maybe; + id: Scalars['String']['output']; + job: Scalars['Json']['output']; + lastError?: Maybe; + lockAt?: Maybe; + lockBy?: Maybe; + maxAttempts: Scalars['Int']['output']; + priority: Scalars['Int']['output']; + runAt: Scalars['String']['output']; + status: SubscriberTaskStatusEnum; + subscriberId: Scalars['Int']['output']; + subscriptionId?: Maybe; + taskType: SubscriberTaskTypeEnum; +}; + export type SubscriberTasksConnection = { __typename?: 'SubscriberTasksConnection'; edges: Array; @@ -1479,6 +1673,14 @@ export type SubscriberTasksFilterInput = { taskType?: InputMaybe; }; +export type SubscriberTasksInsertInput = { + id?: InputMaybe; + job: Scalars['Json']['input']; + maxAttempts: Scalars['Int']['input']; + priority: Scalars['Int']['input']; + subscriberId?: InputMaybe; +}; + export type SubscriberTasksOrderInput = { attempts?: InputMaybe; doneAt?: InputMaybe; @@ -1514,49 +1716,49 @@ export type Subscribers = { export type SubscribersBangumiArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type SubscribersCredential3rdArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type SubscribersDownloaderArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type SubscribersEpisodeArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type SubscribersFeedArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type SubscribersSubscriberTaskArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type SubscribersSubscriptionArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; @@ -1652,7 +1854,6 @@ export type SubscriptionBangumiUpdateInput = { }; export const SubscriptionCategoryEnum = { - Manual: 'manual', MikanBangumi: 'mikan_bangumi', MikanSeason: 'mikan_season', MikanSubscriber: 'mikan_subscriber' @@ -1757,42 +1958,42 @@ export type Subscriptions = { export type SubscriptionsBangumiArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type SubscriptionsEpisodeArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type SubscriptionsFeedArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type SubscriptionsSubscriberTaskArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type SubscriptionsSubscriptionBangumiArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; export type SubscriptionsSubscriptionEpisodeArgs = { - filters?: InputMaybe; + filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; @@ -1889,7 +2090,7 @@ export type TextFilterInput = { }; export type GetCredential3rdQueryVariables = Exact<{ - filters: Credential3rdFilterInput; + filter: Credential3rdFilterInput; orderBy?: InputMaybe; pagination?: InputMaybe; }>; @@ -1906,14 +2107,14 @@ export type InsertCredential3rdMutation = { __typename?: 'Mutation', credential3 export type UpdateCredential3rdMutationVariables = Exact<{ data: Credential3rdUpdateInput; - filters: Credential3rdFilterInput; + 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 DeleteCredential3rdMutationVariables = Exact<{ - filters: Credential3rdFilterInput; + filter: Credential3rdFilterInput; }>; @@ -1926,12 +2127,12 @@ export type GetCredential3rdDetailQueryVariables = Exact<{ 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 CheckCredential3rdAvailableQueryVariables = Exact<{ - id: Scalars['Int']['input']; +export type CheckCredential3rdAvailableMutationVariables = Exact<{ + filter: Credential3rdFilterInput; }>; -export type CheckCredential3rdAvailableQuery = { __typename?: 'Query', credential3rdCheckAvailable: { __typename?: 'Credential3rdCheckAvailableInfo', available: boolean } }; +export type CheckCredential3rdAvailableMutation = { __typename?: 'Mutation', credential3rdCheckAvailable: { __typename?: 'Credential3rdCheckAvailableInfo', available: boolean } }; export type InsertFeedMutationVariables = Exact<{ data: FeedsInsertInput; @@ -1941,14 +2142,14 @@ export type InsertFeedMutationVariables = Exact<{ export type InsertFeedMutation = { __typename?: 'Mutation', feedsCreateOne: { __typename?: 'FeedsBasic', id: number, createdAt: string, updatedAt: string, feedType: FeedTypeEnum, token: string } }; export type DeleteFeedMutationVariables = Exact<{ - filters: FeedsFilterInput; + filter: FeedsFilterInput; }>; export type DeleteFeedMutation = { __typename?: 'Mutation', feedsDelete: number }; export type GetSubscriptionsQueryVariables = Exact<{ - filters: SubscriptionsFilterInput; + filter: SubscriptionsFilterInput; orderBy: SubscriptionsOrderInput; pagination: PaginationInput; }>; @@ -1965,14 +2166,14 @@ export type InsertSubscriptionMutation = { __typename?: 'Mutation', subscription export type UpdateSubscriptionsMutationVariables = Exact<{ data: SubscriptionsUpdateInput; - filters: SubscriptionsFilterInput; + 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 DeleteSubscriptionsMutationVariables = Exact<{ - filters?: InputMaybe; + filter?: InputMaybe; }>; @@ -1990,24 +2191,24 @@ export type SyncSubscriptionFeedsIncrementalMutationVariables = Exact<{ }>; -export type SyncSubscriptionFeedsIncrementalMutation = { __typename?: 'Mutation', subscriptionsSyncOneFeedsIncremental: { __typename?: 'SubscriberTasks', id: string } }; +export type SyncSubscriptionFeedsIncrementalMutation = { __typename?: 'Mutation', subscriptionsSyncOneFeedsIncremental: { __typename?: 'SubscriberTasksBasic', id: string } }; export type SyncSubscriptionFeedsFullMutationVariables = Exact<{ filter: SubscriptionsFilterInput; }>; -export type SyncSubscriptionFeedsFullMutation = { __typename?: 'Mutation', subscriptionsSyncOneFeedsFull: { __typename?: 'SubscriberTasks', id: string } }; +export type SyncSubscriptionFeedsFullMutation = { __typename?: 'Mutation', subscriptionsSyncOneFeedsFull: { __typename?: 'SubscriberTasksBasic', id: string } }; export type SyncSubscriptionSourcesMutationVariables = Exact<{ filter: SubscriptionsFilterInput; }>; -export type SyncSubscriptionSourcesMutation = { __typename?: 'Mutation', subscriptionsSyncOneSources: { __typename?: 'SubscriberTasks', id: string } }; +export type SyncSubscriptionSourcesMutation = { __typename?: 'Mutation', subscriptionsSyncOneSources: { __typename?: 'SubscriberTasksBasic', id: string } }; export type GetTasksQueryVariables = Exact<{ - filters: SubscriberTasksFilterInput; + filter: SubscriberTasksFilterInput; orderBy: SubscriberTasksOrderInput; pagination: PaginationInput; }>; @@ -2016,36 +2217,36 @@ export type GetTasksQueryVariables = Exact<{ export type GetTasksQuery = { __typename?: 'Query', subscriberTasks: { __typename?: 'SubscriberTasksConnection', nodes: Array<{ __typename?: 'SubscriberTasks', id: string, job: any, taskType: SubscriberTaskTypeEnum, status: SubscriberTaskStatusEnum, attempts: number, maxAttempts: number, runAt: string, lastError?: string | null, lockAt?: string | null, lockBy?: string | null, doneAt?: string | null, priority: number }>, paginationInfo?: { __typename?: 'PaginationInfo', total: number, pages: number } | null } }; export type DeleteTasksMutationVariables = Exact<{ - filters: SubscriberTasksFilterInput; + filter: SubscriberTasksFilterInput; }>; export type DeleteTasksMutation = { __typename?: 'Mutation', subscriberTasksDelete: number }; export type RetryTasksMutationVariables = Exact<{ - filters: SubscriberTasksFilterInput; + filter: SubscriberTasksFilterInput; }>; -export type RetryTasksMutation = { __typename?: 'Mutation', subscriberTasksRetryOne: { __typename?: 'SubscriberTasks', id: string, job: any, 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: any, 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":"filters"}},"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":"filters"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filters"}}},{"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 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":"filters"}},"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":"filters"}}}],"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":"filters"}},"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":"filters"}}}]}]}}]} 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":"filters"},"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":"query","name":{"kind":"Name","value":"CheckCredential3rdAvailable"},"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":"credential3rdCheckAvailable"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"available"}}]}}]}}]} 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":"filters"}},"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":"filters"}}}]}]}}]} 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":"filters"}},"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":"filters"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filters"}}},{"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 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":"filters"}},"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":"filters"}}}],"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":"filters"}},"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":"filters"}}}]}]}}]} 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":"filters"},"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":"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 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":"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 SyncSubscriptionFeedsIncrementalDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SyncSubscriptionFeedsIncremental"},"variableDefinitions":[{"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":"subscriptionsSyncOneFeedsIncremental"},"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"}}]}}]}}]} as unknown as DocumentNode; export const SyncSubscriptionFeedsFullDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SyncSubscriptionFeedsFull"},"variableDefinitions":[{"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":"subscriptionsSyncOneFeedsFull"},"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"}}]}}]}}]} as unknown as DocumentNode; export const SyncSubscriptionSourcesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SyncSubscriptionSources"},"variableDefinitions":[{"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":"subscriptionsSyncOneSources"},"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"}}]}}]}}]} 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":"filters"}},"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":"filters"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filters"}}},{"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":"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 DeleteTasksDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteTasks"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filters"}},"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":"filters"}}}]}]}}]} 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":"filters"}},"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":"filters"}}}],"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 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":"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 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 diff --git a/apps/webui/src/infra/routes/nav.ts b/apps/webui/src/infra/routes/nav.ts index 04705ca..bbcf1af 100644 --- a/apps/webui/src/infra/routes/nav.ts +++ b/apps/webui/src/infra/routes/nav.ts @@ -1,14 +1,6 @@ import type { ProLinkProps } from '@/components/ui/pro-link'; import { type } from 'arktype'; -import { - BookOpen, - Folders, - KeyRound, - type LucideIcon, - Settings2, - SquareTerminal, - Telescope, -} from 'lucide-react'; +import type { LucideIcon } from 'lucide-react'; export interface NavMainItem { link?: ProLinkProps; diff --git a/apps/webui/src/presentation/routes/_app/credential3rd/-check-available.tsx b/apps/webui/src/presentation/routes/_app/credential3rd/-check-available.tsx index 103b7e2..db7cae2 100644 --- a/apps/webui/src/presentation/routes/_app/credential3rd/-check-available.tsx +++ b/apps/webui/src/presentation/routes/_app/credential3rd/-check-available.tsx @@ -6,14 +6,14 @@ import { DialogTitle, } from '@/components/ui/dialog'; import { CHECK_CREDENTIAL_3RD_AVAILABLE } from '@/domains/recorder/schema/credential3rd'; -import { - apolloErrorToMessage, - getApolloQueryError, -} from '@/infra/errors/apollo'; -import type { CheckCredential3rdAvailableQuery } from '@/infra/graphql/gql/graphql'; -import { useLazyQuery } from '@apollo/client'; +import { apolloErrorToMessage } from '@/infra/errors/apollo'; +import type { + CheckCredential3rdAvailableMutation, + CheckCredential3rdAvailableMutationVariables, +} from '@/infra/graphql/gql/graphql'; +import { useMutation } from '@apollo/client'; import { CheckIcon, Loader2, XIcon } from 'lucide-react'; -import { memo, useCallback } from 'react'; +import { memo } from 'react'; import { toast } from 'sonner'; export interface Credential3rdCheckAvailableViewProps { @@ -22,30 +22,23 @@ export interface Credential3rdCheckAvailableViewProps { export const Credential3rdCheckAvailableView = memo( ({ id }: Credential3rdCheckAvailableViewProps) => { - const [checkAvailable, { data, error, loading }] = - useLazyQuery( - CHECK_CREDENTIAL_3RD_AVAILABLE, - { - variables: { id }, + const [checkAvailable, { data, error, loading }] = useMutation< + CheckCredential3rdAvailableMutation, + CheckCredential3rdAvailableMutationVariables + >(CHECK_CREDENTIAL_3RD_AVAILABLE, { + onCompleted: (data) => { + if (data.credential3rdCheckAvailable.available) { + toast.success('Credential is available'); + } else { + toast.error('Credential is not available'); } - ); - - const handleCheckAvailable = useCallback(async () => { - const checkResult = await checkAvailable(); - const error = getApolloQueryError(checkResult); - console.error('error', error); - if (error) { + }, + onError: (error) => { toast.error('Failed to check available', { description: apolloErrorToMessage(error), }); - return; - } - if (checkResult.data?.credential3rdCheckAvailable.available) { - toast.success('Credential is available'); - } else { - toast.error('Credential is not available'); - } - }, [checkAvailable]); + }, + }); const available = data?.credential3rdCheckAvailable?.available; @@ -54,7 +47,11 @@ export const Credential3rdCheckAvailableView = memo(