diff --git a/apps/webui/graphql-codegen.ts b/apps/webui/graphql-codegen.ts index 018646b..7838389 100644 --- a/apps/webui/graphql-codegen.ts +++ b/apps/webui/graphql-codegen.ts @@ -12,6 +12,7 @@ const config: CodegenConfig = { }, config: { enumsAsConst: true, + useTypeImports: true, scalars: { SubscriberTaskType: { input: 'recorder/bindings/SubscriberTaskInput#SubscriberTaskInput', diff --git a/apps/webui/src/components/domains/cron/cron-builder.tsx b/apps/webui/src/components/domains/cron/cron-builder.tsx index 89dbb95..55b27ba 100644 --- a/apps/webui/src/components/domains/cron/cron-builder.tsx +++ b/apps/webui/src/components/domains/cron/cron-builder.tsx @@ -1,3 +1,14 @@ +import { getFutureMatches } from '@datasert/cronjs-matcher'; +import { Calendar, Clock, Info, Settings, Zap } from 'lucide-react'; +import { + type CSSProperties, + type FC, + memo, + useCallback, + useEffect, + useMemo, + useState, +} from 'react'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { @@ -20,16 +31,6 @@ import { Separator } from '@/components/ui/separator'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group'; import { cn } from '@/presentation/utils'; -import { getFutureMatches } from '@datasert/cronjs-matcher'; -import { Calendar, Clock, Info, Settings, Zap } from 'lucide-react'; -import { - type CSSProperties, - type FC, - useCallback, - useEffect, - useMemo, - useState, -} from 'react'; import { type CronBuilderProps, CronField, @@ -345,7 +346,7 @@ const CronBuilder: FC = ({
handlePeriodChange(value as CronPeriod)} + onValueChange={(v) => handlePeriodChange(v as CronPeriod)} >
= ({ const currentValue = fields[field]; return ( -
- - - {field === 'month' || field === 'dayOfWeek' ? ( - - // biome-ignore lint/nursery/noNestedTernary: - ) : field === 'dayOfMonth' ? ( -
- -
- ) : ( -
- { - if (value === '*') { - onChange(field, '*'); - } else if (value === 'specific' && currentValue === '*') { - onChange(field, '0'); - } - }} - disabled={disabled} - > - - Any - - - Specific - - - - {currentValue !== '*' && ( - onChange(field, e.target.value)} - placeholder={`0-${config.max}`} - disabled={disabled} - className="font-mono text-sm" - /> - )} - -
-
- - - Range: {config.min}-{config.max} - -
-
- Supports: *, numbers, ranges (1-5), lists (1,3,5), steps - (*/5) -
-
-
- )} -
+ ); })}
); }; +const CronFieldItemAnyOrSpecificOption = { + Any: 'any', + Specific: 'specific', +} as const; + +type CronFieldItemAnyOrSpecificOption = + (typeof CronFieldItemAnyOrSpecificOption)[keyof typeof CronFieldItemAnyOrSpecificOption]; + +interface CronFieldItemEditorProps { + config: CronFieldConfig; + field: CronField; + value: string; + onChange: (field: CronField, value: string) => void; + disabled?: boolean; +} + +function encodeCronFieldItem(value: string): string { + if (value === '') { + return ''; + } + + if (value.includes(' ')) { + return ``; + } + + return value; +} + +function decodeCronFieldItem(value: string): string { + if (value.startsWith(']+)>$/, '$1') + ); + } + + if (value === '') { + return ''; + } + + return value; +} + +export const CronFieldItemEditor: FC = memo( + ({ field, value, onChange, config, disabled = false }) => { + const [innerValue, _setInnerValue] = useState(() => + decodeCronFieldItem(value) + ); + + const [anyOrSpecificOption, _setAnyOrSpecificOption] = + useState(() => + innerValue === '*' + ? CronFieldItemAnyOrSpecificOption.Any + : CronFieldItemAnyOrSpecificOption.Specific + ); + + // biome-ignore lint/correctness/useExhaustiveDependencies: false + useEffect(() => { + const nextValue = decodeCronFieldItem(value); + if (nextValue !== innerValue) { + _setInnerValue(nextValue); + } + }, [value]); + + const handleChange = useCallback( + (v: string) => { + _setInnerValue(v); + onChange(field, encodeCronFieldItem(v)); + }, + [field, onChange] + ); + + const setAnyOrSpecificOption = useCallback( + (v: CronFieldItemAnyOrSpecificOption) => { + _setAnyOrSpecificOption(v); + if (v === CronFieldItemAnyOrSpecificOption.Any) { + handleChange('*'); + } else if (v === CronFieldItemAnyOrSpecificOption.Specific) { + handleChange('0'); + } + }, + [handleChange] + ); + + return ( +
+ + + {(field === 'month' || field === 'dayOfWeek') && ( + + )} + {field === 'dayOfMonth' && ( +
+ +
+ )} + {!( + field === 'month' || + field === 'dayOfWeek' || + field === 'dayOfMonth' + ) && ( +
+ + + Any + + + Specific + + + + {anyOrSpecificOption === + CronFieldItemAnyOrSpecificOption.Specific && ( + handleChange(e.target.value)} + placeholder={`0-${config.max}`} + disabled={disabled} + className="font-mono text-sm" + /> + )} + +
+
+ + + Range: {config.min}-{config.max} + +
+
+ Supports: *, numbers, ranges (1-5), lists (1,3,5), steps (*/5) +
+
+
+ )} +
+ ); + } +); + function parseCronExpression(expression: string): Record { const parts = expression.split(' '); diff --git a/apps/webui/src/components/domains/cron/cron-input.tsx b/apps/webui/src/components/domains/cron/cron-input.tsx index 7a317cc..fa44c4f 100644 --- a/apps/webui/src/components/domains/cron/cron-input.tsx +++ b/apps/webui/src/components/domains/cron/cron-input.tsx @@ -33,7 +33,11 @@ const CronInput = forwardRef( const validationResult = useMemo((): CronValidationResult => { if (!internalValue.trim()) { - return { isValid: false, error: 'Expression is required' }; + return { + isValid: false, + error: 'Expression is required', + isEmpty: true, + }; } try { diff --git a/apps/webui/src/components/domains/cron/cron.tsx b/apps/webui/src/components/domains/cron/cron.tsx index c3739ba..d7aae5a 100644 --- a/apps/webui/src/components/domains/cron/cron.tsx +++ b/apps/webui/src/components/domains/cron/cron.tsx @@ -1,3 +1,14 @@ +import { parse } from '@datasert/cronjs-parser'; +import { + AlertCircle, + Bolt, + Check, + Code2, + Copy, + Settings, + Type, +} from 'lucide-react'; +import { type FC, useCallback, useEffect, useMemo, useState } from 'react'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { @@ -10,17 +21,6 @@ import { import { Separator } from '@/components/ui/separator'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { cn } from '@/presentation/utils'; -import { parse } from '@datasert/cronjs-parser'; -import { - AlertCircle, - Bolt, - Check, - Code2, - Copy, - Settings, - Type, -} from 'lucide-react'; -import { type FC, useCallback, useEffect, useMemo, useState } from 'react'; import { CronBuilder } from './cron-builder'; import { CronDisplay } from './cron-display'; import { CronInput } from './cron-input'; @@ -55,7 +55,7 @@ const Cron: FC = ({ showPresets, withCard = true, isFirstSibling = false, - // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: + // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: false }) => { const [internalValue, setInternalValue] = useState(value || ''); const [internalActiveMode, setInternalActiveMode] = @@ -106,9 +106,9 @@ const Cron: FC = ({ ); const handleActiveModeChange = useCallback( - (mode: CronPrimitiveMode) => { - setInternalActiveMode(mode); - onActiveModeChange?.(mode); + (m: CronPrimitiveMode) => { + setInternalActiveMode(m); + onActiveModeChange?.(m); }, [onActiveModeChange] ); @@ -122,8 +122,8 @@ const Cron: FC = ({ await navigator.clipboard.writeText(internalValue); setCopied(true); setTimeout(() => setCopied(false), 2000); - } catch (error) { - console.warn('Failed to copy to clipboard:', error); + } catch (e) { + console.warn('Failed to copy to clipboard:', e); } }, [internalValue]); @@ -241,8 +241,8 @@ const Cron: FC = ({ - handleActiveModeChange(value as 'input' | 'builder') + onValueChange={(v) => + handleActiveModeChange(v as 'input' | 'builder') } > diff --git a/apps/webui/src/components/domains/cron/index.ts b/apps/webui/src/components/domains/cron/index.ts index ccc38df..ee610b7 100644 --- a/apps/webui/src/components/domains/cron/index.ts +++ b/apps/webui/src/components/domains/cron/index.ts @@ -1,20 +1,20 @@ export { Cron } from './cron'; -export { CronInput } from './cron-input'; export { CronBuilder } from './cron-builder'; export { CronDisplay } from './cron-display'; export { CronExample } from './cron-example'; +export { CronInput } from './cron-input'; export { - type CronProps, - type CronInputProps, type CronBuilderProps, type CronDisplayProps, type CronExpression, + CronField, + type CronFieldConfig, + type CronInputProps, + type CronNextRun, CronPeriod, type CronPreset, + type CronProps, type CronValidationResult, - type CronNextRun, - type CronFieldConfig, - CronField, type PeriodConfig, } from './types'; diff --git a/apps/webui/src/domains/recorder/schema/cron.ts b/apps/webui/src/domains/recorder/schema/cron.ts index cc6c9d7..aeab377 100644 --- a/apps/webui/src/domains/recorder/schema/cron.ts +++ b/apps/webui/src/domains/recorder/schema/cron.ts @@ -1,6 +1,5 @@ -import type { CronPreset } from '@/components/domains/cron'; -import type { GetCronsQuery } from '@/infra/graphql/gql/graphql'; import { gql } from '@apollo/client'; +import type { GetCronsQuery } from '@/infra/graphql/gql/graphql'; export const GET_CRONS = gql` query GetCrons($filter: CronFilterInput!, $orderBy: CronOrderInput!, $pagination: PaginationInput!) { diff --git a/apps/webui/src/domains/recorder/schema/subscriptions.ts b/apps/webui/src/domains/recorder/schema/subscriptions.ts index 7f74af3..696c32e 100644 --- a/apps/webui/src/domains/recorder/schema/subscriptions.ts +++ b/apps/webui/src/domains/recorder/schema/subscriptions.ts @@ -1,16 +1,16 @@ +import { gql } from '@apollo/client'; +import { type } from 'arktype'; import { arkValidatorToTypeNarrower } from '@/infra/errors/arktype'; import { type GetSubscriptionsQuery, SubscriptionCategoryEnum, } from '@/infra/graphql/gql/graphql'; -import { gql } from '@apollo/client'; -import { type } from 'arktype'; import { + extractMikanSubscriptionBangumiSourceUrl, + extractMikanSubscriptionSubscriberSourceUrl, MikanSubscriptionBangumiSourceUrlSchema, MikanSubscriptionSeasonSourceUrlSchema, MikanSubscriptionSubscriberSourceUrlSchema, - extractMikanSubscriptionBangumiSourceUrl, - extractMikanSubscriptionSubscriberSourceUrl, } from './mikan'; export const GET_SUBSCRIPTIONS = gql` diff --git a/apps/webui/src/domains/recorder/schema/tasks.ts b/apps/webui/src/domains/recorder/schema/tasks.ts index 25f1509..2603bf1 100644 --- a/apps/webui/src/domains/recorder/schema/tasks.ts +++ b/apps/webui/src/domains/recorder/schema/tasks.ts @@ -1,5 +1,5 @@ -import type { GetTasksQuery } from '@/infra/graphql/gql/graphql'; import { gql } from '@apollo/client'; +import type { GetTasksQuery } from '@/infra/graphql/gql/graphql'; export const GET_TASKS = gql` query GetTasks($filter: SubscriberTasksFilterInput!, $orderBy: SubscriberTasksOrderInput!, $pagination: PaginationInput!) { diff --git a/apps/webui/src/infra/forms/compat.ts b/apps/webui/src/infra/forms/compat.ts new file mode 100644 index 0000000..b4927ef --- /dev/null +++ b/apps/webui/src/infra/forms/compat.ts @@ -0,0 +1,30 @@ +type AllKeys = T extends any ? keyof T : never; + +type ToDefaultable = Exclude< + T extends string | undefined + ? T | '' + : T extends number | undefined + ? T | number + : T extends undefined + ? T | null + : T, + undefined +>; + +type PickFieldFormUnion = T extends any + ? T[keyof T & K] + : never; + +// compact more types; +export type FormDefaultValues = { + -readonly [K in AllKeys]-?: ToDefaultable>; +}; + +/** + * https://github.com/shadcn-ui/ui/issues/427 + */ +export function compatFormDefaultValues = AllKeys>( + d: FormDefaultValues> +): T { + return d as unknown as T; +} diff --git a/apps/webui/src/infra/graphql/gql/fragment-masking.ts b/apps/webui/src/infra/graphql/gql/fragment-masking.ts index aca71b1..743a364 100644 --- a/apps/webui/src/infra/graphql/gql/fragment-masking.ts +++ b/apps/webui/src/infra/graphql/gql/fragment-masking.ts @@ -1,7 +1,7 @@ /* eslint-disable */ -import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core'; -import { FragmentDefinitionNode } from 'graphql'; -import { Incremental } from './graphql'; +import type { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core'; +import type { FragmentDefinitionNode } from 'graphql'; +import type { Incremental } from './graphql'; export type FragmentType> = TDocumentType extends DocumentTypeDecoration< diff --git a/apps/webui/src/infra/graphql/gql/gql.ts b/apps/webui/src/infra/graphql/gql/gql.ts index 693c807..41fea8e 100644 --- a/apps/webui/src/infra/graphql/gql/gql.ts +++ b/apps/webui/src/infra/graphql/gql/gql.ts @@ -1,6 +1,6 @@ /* eslint-disable */ import * as types from './graphql'; -import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; +import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; /** * Map of all GraphQL operations in the project. @@ -31,7 +31,7 @@ type 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": typeof types.UpdateSubscriptionsDocument, "\n mutation DeleteSubscriptions($filter: SubscriptionsFilterInput) {\n subscriptionsDelete(filter: $filter)\n }\n": typeof types.DeleteSubscriptionsDocument, "\nquery GetSubscriptionDetail ($id: Int!) {\n subscriptions(filter: { id: {\n eq: $id\n } }) {\n nodes {\n id\n subscriberId\n displayName\n createdAt\n updatedAt\n category\n sourceUrl\n enabled\n feed {\n nodes {\n id\n createdAt\n updatedAt\n token\n feedType\n feedSource\n }\n }\n subscriberTask {\n nodes {\n id\n taskType\n status\n }\n }\n credential3rd {\n id\n username\n }\n cron {\n nodes {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n enabled\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n subscriberTaskCron\n }\n }\n bangumi {\n nodes {\n createdAt\n updatedAt\n id\n mikanBangumiId\n displayName\n season\n seasonRaw\n fansub\n mikanFansubId\n rssLink\n posterLink\n homepage\n }\n }\n }\n }\n}\n": typeof types.GetSubscriptionDetailDocument, - "\n query GetTasks($filter: SubscriberTasksFilterInput!, $orderBy: SubscriberTasksOrderInput!, $pagination: PaginationInput!) {\n subscriberTasks(\n pagination: $pagination\n filter: $filter\n orderBy: $orderBy\n ) {\n nodes {\n id,\n job,\n taskType,\n status,\n attempts,\n maxAttempts,\n runAt,\n lastError,\n lockAt,\n lockBy,\n doneAt,\n priority,\n subscription {\n displayName\n sourceUrl\n cron {\n nodes {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n }\n }\n }\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n": typeof types.GetTasksDocument, + "\n query GetTasks($filter: SubscriberTasksFilterInput!, $orderBy: SubscriberTasksOrderInput!, $pagination: PaginationInput!) {\n subscriberTasks(\n pagination: $pagination\n filter: $filter\n orderBy: $orderBy\n ) {\n nodes {\n id,\n job,\n taskType,\n status,\n attempts,\n maxAttempts,\n runAt,\n lastError,\n lockAt,\n lockBy,\n doneAt,\n priority,\n subscription {\n displayName\n sourceUrl\n }\n cron {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n }\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n": typeof types.GetTasksDocument, "\n mutation InsertSubscriberTask($data: SubscriberTasksInsertInput!) {\n subscriberTasksCreateOne(data: $data) {\n id\n }\n }\n": typeof types.InsertSubscriberTaskDocument, "\n mutation DeleteTasks($filter: SubscriberTasksFilterInput!) {\n subscriberTasksDelete(filter: $filter)\n }\n": typeof types.DeleteTasksDocument, "\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, @@ -54,7 +54,7 @@ const documents: 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": types.UpdateSubscriptionsDocument, "\n mutation DeleteSubscriptions($filter: SubscriptionsFilterInput) {\n subscriptionsDelete(filter: $filter)\n }\n": types.DeleteSubscriptionsDocument, "\nquery GetSubscriptionDetail ($id: Int!) {\n subscriptions(filter: { id: {\n eq: $id\n } }) {\n nodes {\n id\n subscriberId\n displayName\n createdAt\n updatedAt\n category\n sourceUrl\n enabled\n feed {\n nodes {\n id\n createdAt\n updatedAt\n token\n feedType\n feedSource\n }\n }\n subscriberTask {\n nodes {\n id\n taskType\n status\n }\n }\n credential3rd {\n id\n username\n }\n cron {\n nodes {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n enabled\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n subscriberTaskCron\n }\n }\n bangumi {\n nodes {\n createdAt\n updatedAt\n id\n mikanBangumiId\n displayName\n season\n seasonRaw\n fansub\n mikanFansubId\n rssLink\n posterLink\n homepage\n }\n }\n }\n }\n}\n": types.GetSubscriptionDetailDocument, - "\n query GetTasks($filter: SubscriberTasksFilterInput!, $orderBy: SubscriberTasksOrderInput!, $pagination: PaginationInput!) {\n subscriberTasks(\n pagination: $pagination\n filter: $filter\n orderBy: $orderBy\n ) {\n nodes {\n id,\n job,\n taskType,\n status,\n attempts,\n maxAttempts,\n runAt,\n lastError,\n lockAt,\n lockBy,\n doneAt,\n priority,\n subscription {\n displayName\n sourceUrl\n cron {\n nodes {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n }\n }\n }\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n": types.GetTasksDocument, + "\n query GetTasks($filter: SubscriberTasksFilterInput!, $orderBy: SubscriberTasksOrderInput!, $pagination: PaginationInput!) {\n subscriberTasks(\n pagination: $pagination\n filter: $filter\n orderBy: $orderBy\n ) {\n nodes {\n id,\n job,\n taskType,\n status,\n attempts,\n maxAttempts,\n runAt,\n lastError,\n lockAt,\n lockBy,\n doneAt,\n priority,\n subscription {\n displayName\n sourceUrl\n }\n cron {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n }\n }\n paginationInfo {\n total\n pages\n }\n }\n }\n": types.GetTasksDocument, "\n mutation InsertSubscriberTask($data: SubscriberTasksInsertInput!) {\n subscriberTasksCreateOne(data: $data) {\n id\n }\n }\n": types.InsertSubscriberTaskDocument, "\n mutation DeleteTasks($filter: SubscriberTasksFilterInput!) {\n subscriberTasksDelete(filter: $filter)\n }\n": types.DeleteTasksDocument, "\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, @@ -145,7 +145,7 @@ export function gql(source: "\nquery GetSubscriptionDetail ($id: Int!) {\n subs /** * 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($filter: SubscriberTasksFilterInput!, $orderBy: SubscriberTasksOrderInput!, $pagination: PaginationInput!) {\n subscriberTasks(\n pagination: $pagination\n filter: $filter\n orderBy: $orderBy\n ) {\n nodes {\n id,\n job,\n taskType,\n status,\n attempts,\n maxAttempts,\n runAt,\n lastError,\n lockAt,\n lockBy,\n doneAt,\n priority,\n subscription {\n displayName\n sourceUrl\n cron {\n nodes {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n }\n }\n }\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 subscription {\n displayName\n sourceUrl\n cron {\n nodes {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n }\n }\n }\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 subscription {\n displayName\n sourceUrl\n }\n cron {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n }\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 subscription {\n displayName\n sourceUrl\n }\n cron {\n id\n cronExpr\n nextRun\n lastRun\n lastError\n status\n lockedAt\n lockedBy\n createdAt\n updatedAt\n timeoutMs\n maxAttempts\n priority\n attempts\n }\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. */ diff --git a/apps/webui/src/infra/graphql/gql/graphql.ts b/apps/webui/src/infra/graphql/gql/graphql.ts index 561e38b..1914a7a 100644 --- a/apps/webui/src/infra/graphql/gql/graphql.ts +++ b/apps/webui/src/infra/graphql/gql/graphql.ts @@ -1,28 +1,44 @@ /* eslint-disable */ -import { SubscriberTaskInput } from 'recorder/bindings/SubscriberTaskInput'; -import { SubscriberTaskType } from 'recorder/bindings/SubscriberTaskType'; -import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; +import type { SubscriberTaskInput } from 'recorder/bindings/SubscriberTaskInput'; +import type { SubscriberTaskType } from 'recorder/bindings/SubscriberTaskType'; +import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; export type Maybe = T | null; export type InputMaybe = Maybe; -export type Exact = { [K in keyof T]: T[K] }; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; +export type Exact = { + [K in keyof T]: T[K]; +}; +export type MakeOptional = Omit & { + [SubKey in K]?: Maybe; +}; +export type MakeMaybe = Omit & { + [SubKey in K]: Maybe; +}; +export type MakeEmpty< + T extends { [key: string]: unknown }, + K extends keyof T, +> = { [_ in K]?: never }; +export type Incremental = + | T + | { + [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never; + }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } + ID: { input: string; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; /** The `JSON` scalar type represents raw JSON values */ - Json: { input: any; output: any; } - JsonbFilterInput: { input: any; output: any; } + Json: { input: any; output: any }; + JsonbFilterInput: { input: any; output: any }; /** type SubscriberTaskType = { "taskType": "sync_one_subscription_feeds_incremental" } & SyncOneSubscriptionFeedsIncrementalTask | { "taskType": "sync_one_subscription_feeds_full" } & SyncOneSubscriptionFeedsFullTask | { "taskType": "sync_one_subscription_sources" } & SyncOneSubscriptionSourcesTask; */ - SubscriberTaskType: { input: SubscriberTaskInput; output: SubscriberTaskType; } + SubscriberTaskType: { + input: SubscriberTaskInput; + output: SubscriberTaskType; + }; /** type SystemTaskType = { "taskType": "optimize_image" } & OptimizeImageTask | { "taskType": "test" } & EchoTask; */ - SystemTaskType: { input: any; output: any; } + SystemTaskType: { input: any; output: any }; }; export type Bangumi = { @@ -50,21 +66,18 @@ export type Bangumi = { updatedAt: Scalars['String']['output']; }; - export type BangumiEpisodeArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type BangumiSubscriptionArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type BangumiSubscriptionBangumiArgs = { filter?: InputMaybe; orderBy?: InputMaybe; @@ -168,10 +181,11 @@ export type BangumiOrderInput = { }; export const BangumiTypeEnum = { - Mikan: 'mikan' + Mikan: 'mikan', } as const; -export type BangumiTypeEnum = typeof BangumiTypeEnum[keyof typeof BangumiTypeEnum]; +export type BangumiTypeEnum = + (typeof BangumiTypeEnum)[keyof typeof BangumiTypeEnum]; export type BangumiTypeEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -232,7 +246,6 @@ export type Credential3rd = { username?: Maybe; }; - export type Credential3rdSubscriptionArgs = { filter?: InputMaybe; orderBy?: InputMaybe; @@ -311,10 +324,11 @@ export type Credential3rdOrderInput = { }; export const Credential3rdTypeEnum = { - Mikan: 'mikan' + Mikan: 'mikan', } as const; -export type Credential3rdTypeEnum = typeof Credential3rdTypeEnum[keyof typeof Credential3rdTypeEnum]; +export type Credential3rdTypeEnum = + (typeof Credential3rdTypeEnum)[keyof typeof Credential3rdTypeEnum]; export type Credential3rdTypeEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -367,14 +381,12 @@ export type Cron = { updatedAt: Scalars['String']['output']; }; - export type CronSubscriberTaskArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type CronSystemTaskArgs = { filter?: InputMaybe; orderBy?: InputMaybe; @@ -479,12 +491,14 @@ export type CronOrderInput = { export const CronStatusEnum = { Completed: 'completed', + Disabled: 'disabled', Failed: 'failed', Pending: 'pending', - Running: 'running' + Running: 'running', } as const; -export type CronStatusEnum = typeof CronStatusEnum[keyof typeof CronStatusEnum]; +export type CronStatusEnum = + (typeof CronStatusEnum)[keyof typeof CronStatusEnum]; export type CronStatusEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -514,10 +528,11 @@ export type CursorInput = { export const DownloadMimeEnum = { Applicationoctetstream: 'applicationoctetstream', - Applicationxbittorrent: 'applicationxbittorrent' + Applicationxbittorrent: 'applicationxbittorrent', } as const; -export type DownloadMimeEnum = typeof DownloadMimeEnum[keyof typeof DownloadMimeEnum]; +export type DownloadMimeEnum = + (typeof DownloadMimeEnum)[keyof typeof DownloadMimeEnum]; export type DownloadMimeEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -537,10 +552,11 @@ export const DownloadStatusEnum = { Downloading: 'downloading', Failed: 'failed', Paused: 'paused', - Pending: 'pending' + Pending: 'pending', } as const; -export type DownloadStatusEnum = typeof DownloadStatusEnum[keyof typeof DownloadStatusEnum]; +export type DownloadStatusEnum = + (typeof DownloadStatusEnum)[keyof typeof DownloadStatusEnum]; export type DownloadStatusEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -556,10 +572,11 @@ export type DownloadStatusEnumFilterInput = { export const DownloaderCategoryEnum = { Dandanplay: 'dandanplay', - Qbittorrent: 'qbittorrent' + Qbittorrent: 'qbittorrent', } as const; -export type DownloaderCategoryEnum = typeof DownloaderCategoryEnum[keyof typeof DownloaderCategoryEnum]; +export type DownloaderCategoryEnum = + (typeof DownloaderCategoryEnum)[keyof typeof DownloaderCategoryEnum]; export type DownloaderCategoryEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -588,7 +605,6 @@ export type Downloaders = { username: Scalars['String']['output']; }; - export type DownloadersDownloadArgs = { filter?: InputMaybe; orderBy?: InputMaybe; @@ -800,10 +816,11 @@ export type DownloadsUpdateInput = { }; export const EpisodeTypeEnum = { - Mikan: 'mikan' + Mikan: 'mikan', } as const; -export type EpisodeTypeEnum = typeof EpisodeTypeEnum[keyof typeof EpisodeTypeEnum]; +export type EpisodeTypeEnum = + (typeof EpisodeTypeEnum)[keyof typeof EpisodeTypeEnum]; export type EpisodeTypeEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -849,21 +866,18 @@ export type Episodes = { updatedAt: Scalars['String']['output']; }; - export type EpisodesDownloadArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type EpisodesSubscriptionArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type EpisodesSubscriptionEpisodeArgs = { filter?: InputMaybe; orderBy?: InputMaybe; @@ -1017,10 +1031,11 @@ export type EpisodesUpdateInput = { }; export const FeedSourceEnum = { - SubscriptionEpisode: 'subscription_episode' + SubscriptionEpisode: 'subscription_episode', } as const; -export type FeedSourceEnum = typeof FeedSourceEnum[keyof typeof FeedSourceEnum]; +export type FeedSourceEnum = + (typeof FeedSourceEnum)[keyof typeof FeedSourceEnum]; export type FeedSourceEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -1035,10 +1050,10 @@ export type FeedSourceEnumFilterInput = { }; export const FeedTypeEnum = { - Rss: 'rss' + Rss: 'rss', } as const; -export type FeedTypeEnum = typeof FeedTypeEnum[keyof typeof FeedTypeEnum]; +export type FeedTypeEnum = (typeof FeedTypeEnum)[keyof typeof FeedTypeEnum]; export type FeedTypeEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -1204,247 +1219,200 @@ export type Mutation = { systemTasksRetryOne: SystemTasksBasic; }; - export type MutationBangumiCreateBatchArgs = { data: Array; }; - export type MutationBangumiCreateOneArgs = { data: BangumiInsertInput; }; - export type MutationBangumiDeleteArgs = { filter?: InputMaybe; }; - export type MutationBangumiUpdateArgs = { data: BangumiUpdateInput; filter?: InputMaybe; }; - export type MutationCredential3rdCheckAvailableArgs = { filter?: InputMaybe; }; - export type MutationCredential3rdCreateBatchArgs = { data: Array; }; - export type MutationCredential3rdCreateOneArgs = { data: Credential3rdInsertInput; }; - export type MutationCredential3rdDeleteArgs = { filter?: InputMaybe; }; - export type MutationCredential3rdUpdateArgs = { data: Credential3rdUpdateInput; filter?: InputMaybe; }; - export type MutationCronCreateBatchArgs = { data: Array; }; - export type MutationCronCreateOneArgs = { data: CronInsertInput; }; - export type MutationCronDeleteArgs = { filter?: InputMaybe; }; - export type MutationCronUpdateArgs = { data: CronUpdateInput; filter?: InputMaybe; }; - export type MutationDownloadersCreateBatchArgs = { data: Array; }; - export type MutationDownloadersCreateOneArgs = { data: DownloadersInsertInput; }; - export type MutationDownloadersDeleteArgs = { filter?: InputMaybe; }; - export type MutationDownloadersUpdateArgs = { data: DownloadersUpdateInput; filter?: InputMaybe; }; - export type MutationDownloadsCreateBatchArgs = { data: Array; }; - export type MutationDownloadsCreateOneArgs = { data: DownloadsInsertInput; }; - export type MutationDownloadsDeleteArgs = { filter?: InputMaybe; }; - export type MutationDownloadsUpdateArgs = { data: DownloadsUpdateInput; filter?: InputMaybe; }; - export type MutationEpisodesCreateBatchArgs = { data: Array; }; - export type MutationEpisodesCreateOneArgs = { data: EpisodesInsertInput; }; - export type MutationEpisodesDeleteArgs = { filter?: InputMaybe; }; - export type MutationEpisodesUpdateArgs = { data: EpisodesUpdateInput; filter?: InputMaybe; }; - export type MutationFeedsCreateBatchArgs = { data: Array; }; - export type MutationFeedsCreateOneArgs = { data: FeedsInsertInput; }; - export type MutationFeedsDeleteArgs = { filter?: InputMaybe; }; - export type MutationFeedsUpdateArgs = { data: FeedsUpdateInput; filter?: InputMaybe; }; - export type MutationSubscriberTasksCreateOneArgs = { data: SubscriberTasksInsertInput; }; - export type MutationSubscriberTasksDeleteArgs = { filter?: InputMaybe; }; - export type MutationSubscriberTasksRetryOneArgs = { filter?: InputMaybe; }; - export type MutationSubscriptionBangumiCreateBatchArgs = { data: Array; }; - export type MutationSubscriptionBangumiCreateOneArgs = { data: SubscriptionBangumiInsertInput; }; - export type MutationSubscriptionBangumiDeleteArgs = { filter?: InputMaybe; }; - export type MutationSubscriptionBangumiUpdateArgs = { data: SubscriptionBangumiUpdateInput; filter?: InputMaybe; }; - export type MutationSubscriptionEpisodeCreateBatchArgs = { data: Array; }; - export type MutationSubscriptionEpisodeCreateOneArgs = { data: SubscriptionEpisodeInsertInput; }; - export type MutationSubscriptionEpisodeDeleteArgs = { filter?: InputMaybe; }; - export type MutationSubscriptionEpisodeUpdateArgs = { data: SubscriptionEpisodeUpdateInput; filter?: InputMaybe; }; - export type MutationSubscriptionsCreateBatchArgs = { data: Array; }; - export type MutationSubscriptionsCreateOneArgs = { data: SubscriptionsInsertInput; }; - export type MutationSubscriptionsDeleteArgs = { filter?: InputMaybe; }; - export type MutationSubscriptionsUpdateArgs = { data: SubscriptionsUpdateInput; filter?: InputMaybe; }; - export type MutationSystemTasksCreateOneArgs = { data: SystemTasksInsertInput; }; - export type MutationSystemTasksDeleteArgs = { filter?: InputMaybe; }; - export type MutationSystemTasksRetryOneArgs = { filter?: InputMaybe; }; @@ -1456,10 +1424,10 @@ export type OffsetInput = { export const OrderByEnum = { Asc: 'ASC', - Desc: 'DESC' + Desc: 'DESC', } as const; -export type OrderByEnum = typeof OrderByEnum[keyof typeof OrderByEnum]; +export type OrderByEnum = (typeof OrderByEnum)[keyof typeof OrderByEnum]; export type PageInfo = { __typename?: 'PageInfo'; endCursor?: Maybe; @@ -1505,96 +1473,82 @@ export type Query = { systemTasks: SystemTasksConnection; }; - export type Query_Sea_Orm_Entity_MetadataArgs = { table_name: Scalars['String']['input']; }; - export type QueryBangumiArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QueryCredential3rdArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QueryCronArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QueryDownloadersArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QueryDownloadsArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QueryEpisodesArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QueryFeedsArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QuerySubscriberTasksArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QuerySubscribersArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QuerySubscriptionBangumiArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QuerySubscriptionEpisodeArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QuerySubscriptionsArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type QuerySystemTasksArgs = { filter?: InputMaybe; orderBy?: InputMaybe; @@ -1631,17 +1585,20 @@ export const SubscriberTaskStatusEnum = { Killed: 'Killed', Pending: 'Pending', Running: 'Running', - Scheduled: 'Scheduled' + Scheduled: 'Scheduled', } as const; -export type SubscriberTaskStatusEnum = typeof SubscriberTaskStatusEnum[keyof typeof SubscriberTaskStatusEnum]; +export type SubscriberTaskStatusEnum = + (typeof SubscriberTaskStatusEnum)[keyof typeof SubscriberTaskStatusEnum]; export const SubscriberTaskTypeEnum = { SyncOneSubscriptionFeedsFull: 'sync_one_subscription_feeds_full', - SyncOneSubscriptionFeedsIncremental: 'sync_one_subscription_feeds_incremental', - SyncOneSubscriptionSources: 'sync_one_subscription_sources' + SyncOneSubscriptionFeedsIncremental: + 'sync_one_subscription_feeds_incremental', + SyncOneSubscriptionSources: 'sync_one_subscription_sources', } as const; -export type SubscriberTaskTypeEnum = typeof SubscriberTaskTypeEnum[keyof typeof SubscriberTaskTypeEnum]; +export type SubscriberTaskTypeEnum = + (typeof SubscriberTaskTypeEnum)[keyof typeof SubscriberTaskTypeEnum]; export type SubscriberTasks = { __typename?: 'SubscriberTasks'; attempts: Scalars['Int']['output']; @@ -1757,56 +1714,48 @@ export type Subscribers = { updatedAt: Scalars['String']['output']; }; - export type SubscribersBangumiArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscribersCredential3rdArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscribersDownloaderArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscribersEpisodeArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscribersFeedArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscribersSubscriberTaskArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscribersSubscriptionArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscribersSystemTaskArgs = { filter?: InputMaybe; orderBy?: InputMaybe; @@ -1906,10 +1855,11 @@ export type SubscriptionBangumiUpdateInput = { export const SubscriptionCategoryEnum = { MikanBangumi: 'mikan_bangumi', MikanSeason: 'mikan_season', - MikanSubscriber: 'mikan_subscriber' + MikanSubscriber: 'mikan_subscriber', } as const; -export type SubscriptionCategoryEnum = typeof SubscriptionCategoryEnum[keyof typeof SubscriptionCategoryEnum]; +export type SubscriptionCategoryEnum = + (typeof SubscriptionCategoryEnum)[keyof typeof SubscriptionCategoryEnum]; export type SubscriptionCategoryEnumFilterInput = { eq?: InputMaybe; gt?: InputMaybe; @@ -2007,49 +1957,42 @@ export type Subscriptions = { updatedAt: Scalars['String']['output']; }; - export type SubscriptionsBangumiArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscriptionsCronArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscriptionsEpisodeArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscriptionsFeedArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscriptionsSubscriberTaskArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscriptionsSubscriptionBangumiArgs = { filter?: InputMaybe; orderBy?: InputMaybe; pagination?: InputMaybe; }; - export type SubscriptionsSubscriptionEpisodeArgs = { filter?: InputMaybe; orderBy?: InputMaybe; @@ -2138,16 +2081,18 @@ export const SystemTaskStatusEnum = { Killed: 'Killed', Pending: 'Pending', Running: 'Running', - Scheduled: 'Scheduled' + Scheduled: 'Scheduled', } as const; -export type SystemTaskStatusEnum = typeof SystemTaskStatusEnum[keyof typeof SystemTaskStatusEnum]; +export type SystemTaskStatusEnum = + (typeof SystemTaskStatusEnum)[keyof typeof SystemTaskStatusEnum]; export const SystemTaskTypeEnum = { OptimizeImage: 'optimize_image', - Test: 'test' + Test: 'test', } as const; -export type SystemTaskTypeEnum = typeof SystemTaskTypeEnum[keyof typeof SystemTaskTypeEnum]; +export type SystemTaskTypeEnum = + (typeof SystemTaskTypeEnum)[keyof typeof SystemTaskTypeEnum]; export type SystemTasks = { __typename?: 'SystemTasks'; attempts: Scalars['Int']['output']; @@ -2262,44 +2207,110 @@ export type GetCredential3rdQueryVariables = Exact<{ pagination?: InputMaybe; }>; - -export type GetCredential3rdQuery = { __typename?: 'Query', credential3rd: { __typename?: 'Credential3rdConnection', nodes: Array<{ __typename?: 'Credential3rd', id: number, cookies?: string | null, username?: string | null, password?: string | null, userAgent?: string | null, createdAt: string, updatedAt: string, credentialType: Credential3rdTypeEnum }>, paginationInfo?: { __typename?: 'PaginationInfo', total: number, pages: number } | null } }; +export type GetCredential3rdQuery = { + __typename?: 'Query'; + credential3rd: { + __typename?: 'Credential3rdConnection'; + nodes: Array<{ + __typename?: 'Credential3rd'; + id: number; + cookies?: string | null; + username?: string | null; + password?: string | null; + userAgent?: string | null; + createdAt: string; + updatedAt: string; + credentialType: Credential3rdTypeEnum; + }>; + paginationInfo?: { + __typename?: 'PaginationInfo'; + total: number; + pages: number; + } | null; + }; +}; export type InsertCredential3rdMutationVariables = Exact<{ data: Credential3rdInsertInput; }>; - -export type InsertCredential3rdMutation = { __typename?: 'Mutation', credential3rdCreateOne: { __typename?: 'Credential3rdBasic', id: number, cookies?: string | null, username?: string | null, password?: string | null, userAgent?: string | null, createdAt: string, updatedAt: string, credentialType: Credential3rdTypeEnum } }; +export type InsertCredential3rdMutation = { + __typename?: 'Mutation'; + credential3rdCreateOne: { + __typename?: 'Credential3rdBasic'; + id: number; + cookies?: string | null; + username?: string | null; + password?: string | null; + userAgent?: string | null; + createdAt: string; + updatedAt: string; + credentialType: Credential3rdTypeEnum; + }; +}; export type UpdateCredential3rdMutationVariables = Exact<{ data: Credential3rdUpdateInput; filter: Credential3rdFilterInput; }>; - -export type UpdateCredential3rdMutation = { __typename?: 'Mutation', credential3rdUpdate: Array<{ __typename?: 'Credential3rdBasic', id: number, cookies?: string | null, username?: string | null, password?: string | null, userAgent?: string | null, createdAt: string, updatedAt: string, credentialType: Credential3rdTypeEnum }> }; +export type UpdateCredential3rdMutation = { + __typename?: 'Mutation'; + credential3rdUpdate: Array<{ + __typename?: 'Credential3rdBasic'; + id: number; + cookies?: string | null; + username?: string | null; + password?: string | null; + userAgent?: string | null; + createdAt: string; + updatedAt: string; + credentialType: Credential3rdTypeEnum; + }>; +}; export type DeleteCredential3rdMutationVariables = Exact<{ filter: Credential3rdFilterInput; }>; - -export type DeleteCredential3rdMutation = { __typename?: 'Mutation', credential3rdDelete: number }; +export type DeleteCredential3rdMutation = { + __typename?: 'Mutation'; + credential3rdDelete: number; +}; export type GetCredential3rdDetailQueryVariables = Exact<{ id: Scalars['Int']['input']; }>; - -export type GetCredential3rdDetailQuery = { __typename?: 'Query', credential3rd: { __typename?: 'Credential3rdConnection', nodes: Array<{ __typename?: 'Credential3rd', id: number, cookies?: string | null, username?: string | null, password?: string | null, userAgent?: string | null, createdAt: string, updatedAt: string, credentialType: Credential3rdTypeEnum }> } }; +export type GetCredential3rdDetailQuery = { + __typename?: 'Query'; + credential3rd: { + __typename?: 'Credential3rdConnection'; + nodes: Array<{ + __typename?: 'Credential3rd'; + id: number; + cookies?: string | null; + username?: string | null; + password?: string | null; + userAgent?: string | null; + createdAt: string; + updatedAt: string; + credentialType: Credential3rdTypeEnum; + }>; + }; +}; export type CheckCredential3rdAvailableMutationVariables = Exact<{ filter: Credential3rdFilterInput; }>; - -export type CheckCredential3rdAvailableMutation = { __typename?: 'Mutation', credential3rdCheckAvailable: { __typename?: 'Credential3rdCheckAvailableInfo', available: boolean } }; +export type CheckCredential3rdAvailableMutation = { + __typename?: 'Mutation'; + credential3rdCheckAvailable: { + __typename?: 'Credential3rdCheckAvailableInfo'; + available: boolean; + }; +}; export type GetCronsQueryVariables = Exact<{ filter: CronFilterInput; @@ -2307,44 +2318,148 @@ export type GetCronsQueryVariables = Exact<{ pagination: PaginationInput; }>; - -export type GetCronsQuery = { __typename?: 'Query', cron: { __typename?: 'CronConnection', nodes: Array<{ __typename?: 'Cron', id: number, cronExpr: string, nextRun?: string | null, lastRun?: string | null, lastError?: string | null, status: CronStatusEnum, lockedAt?: string | null, lockedBy?: string | null, createdAt: string, updatedAt: string, timeoutMs?: number | null, maxAttempts: number, priority: number, attempts: number, enabled: boolean, subscriberTaskCron?: SubscriberTaskType | null, subscriberTask: { __typename?: 'SubscriberTasksConnection', nodes: Array<{ __typename?: 'SubscriberTasks', id: string, job: SubscriberTaskType, taskType: SubscriberTaskTypeEnum, status: SubscriberTaskStatusEnum, attempts: number, maxAttempts: number, runAt: string, lastError?: string | null, lockAt?: string | null, lockBy?: string | null, doneAt?: string | null, priority: number, subscription?: { __typename?: 'Subscriptions', displayName: string, sourceUrl: string } | null }> } }>, paginationInfo?: { __typename?: 'PaginationInfo', total: number, pages: number } | null } }; +export type GetCronsQuery = { + __typename?: 'Query'; + cron: { + __typename?: 'CronConnection'; + nodes: Array<{ + __typename?: 'Cron'; + id: number; + cronExpr: string; + nextRun?: string | null; + lastRun?: string | null; + lastError?: string | null; + status: CronStatusEnum; + lockedAt?: string | null; + lockedBy?: string | null; + createdAt: string; + updatedAt: string; + timeoutMs?: number | null; + maxAttempts: number; + priority: number; + attempts: number; + enabled: boolean; + subscriberTaskCron?: SubscriberTaskType | null; + subscriberTask: { + __typename?: 'SubscriberTasksConnection'; + nodes: Array<{ + __typename?: 'SubscriberTasks'; + id: string; + job: SubscriberTaskType; + taskType: SubscriberTaskTypeEnum; + status: SubscriberTaskStatusEnum; + attempts: number; + maxAttempts: number; + runAt: string; + lastError?: string | null; + lockAt?: string | null; + lockBy?: string | null; + doneAt?: string | null; + priority: number; + subscription?: { + __typename?: 'Subscriptions'; + displayName: string; + sourceUrl: string; + } | null; + }>; + }; + }>; + paginationInfo?: { + __typename?: 'PaginationInfo'; + total: number; + pages: number; + } | null; + }; +}; export type DeleteCronsMutationVariables = Exact<{ filter: CronFilterInput; }>; - -export type DeleteCronsMutation = { __typename?: 'Mutation', cronDelete: number }; +export type DeleteCronsMutation = { + __typename?: 'Mutation'; + cronDelete: number; +}; export type UpdateCronsMutationVariables = Exact<{ filter: CronFilterInput; data: CronUpdateInput; }>; - -export type UpdateCronsMutation = { __typename?: 'Mutation', cronUpdate: Array<{ __typename?: 'CronBasic', id: number, cronExpr: string, nextRun?: string | null, lastRun?: string | null, lastError?: string | null, status: CronStatusEnum, lockedAt?: string | null, lockedBy?: string | null, createdAt: string, updatedAt: string, timeoutMs?: number | null, enabled: boolean, maxAttempts: number, priority: number, attempts: number, subscriberTaskCron?: SubscriberTaskType | null }> }; +export type UpdateCronsMutation = { + __typename?: 'Mutation'; + cronUpdate: Array<{ + __typename?: 'CronBasic'; + id: number; + cronExpr: string; + nextRun?: string | null; + lastRun?: string | null; + lastError?: string | null; + status: CronStatusEnum; + lockedAt?: string | null; + lockedBy?: string | null; + createdAt: string; + updatedAt: string; + timeoutMs?: number | null; + enabled: boolean; + maxAttempts: number; + priority: number; + attempts: number; + subscriberTaskCron?: SubscriberTaskType | null; + }>; +}; export type InsertCronMutationVariables = Exact<{ data: CronInsertInput; }>; - -export type InsertCronMutation = { __typename?: 'Mutation', cronCreateOne: { __typename?: 'CronBasic', id: number, cronExpr: string, nextRun?: string | null, lastRun?: string | null, lastError?: string | null, status: CronStatusEnum, lockedAt?: string | null, lockedBy?: string | null, createdAt: string, updatedAt: string, enabled: boolean, timeoutMs?: number | null, maxAttempts: number, priority: number, attempts: number, subscriberTaskCron?: SubscriberTaskType | null } }; +export type InsertCronMutation = { + __typename?: 'Mutation'; + cronCreateOne: { + __typename?: 'CronBasic'; + id: number; + cronExpr: string; + nextRun?: string | null; + lastRun?: string | null; + lastError?: string | null; + status: CronStatusEnum; + lockedAt?: string | null; + lockedBy?: string | null; + createdAt: string; + updatedAt: string; + enabled: boolean; + timeoutMs?: number | null; + maxAttempts: number; + priority: number; + attempts: number; + subscriberTaskCron?: SubscriberTaskType | null; + }; +}; export type InsertFeedMutationVariables = Exact<{ data: FeedsInsertInput; }>; - -export type InsertFeedMutation = { __typename?: 'Mutation', feedsCreateOne: { __typename?: 'FeedsBasic', id: number, createdAt: string, updatedAt: string, feedType: FeedTypeEnum, token: string } }; +export type InsertFeedMutation = { + __typename?: 'Mutation'; + feedsCreateOne: { + __typename?: 'FeedsBasic'; + id: number; + createdAt: string; + updatedAt: string; + feedType: FeedTypeEnum; + token: string; + }; +}; export type DeleteFeedMutationVariables = Exact<{ filter: FeedsFilterInput; }>; - -export type DeleteFeedMutation = { __typename?: 'Mutation', feedsDelete: number }; +export type DeleteFeedMutation = { + __typename?: 'Mutation'; + feedsDelete: number; +}; export type GetSubscriptionsQueryVariables = Exact<{ filter: SubscriptionsFilterInput; @@ -2352,37 +2467,163 @@ export type GetSubscriptionsQueryVariables = Exact<{ pagination: PaginationInput; }>; - -export type GetSubscriptionsQuery = { __typename?: 'Query', subscriptions: { __typename?: 'SubscriptionsConnection', nodes: Array<{ __typename?: 'Subscriptions', id: number, createdAt: string, updatedAt: string, displayName: string, category: SubscriptionCategoryEnum, sourceUrl: string, enabled: boolean, credentialId?: number | null }>, paginationInfo?: { __typename?: 'PaginationInfo', total: number, pages: number } | null } }; +export type GetSubscriptionsQuery = { + __typename?: 'Query'; + subscriptions: { + __typename?: 'SubscriptionsConnection'; + nodes: Array<{ + __typename?: 'Subscriptions'; + id: number; + createdAt: string; + updatedAt: string; + displayName: string; + category: SubscriptionCategoryEnum; + sourceUrl: string; + enabled: boolean; + credentialId?: number | null; + }>; + paginationInfo?: { + __typename?: 'PaginationInfo'; + total: number; + pages: number; + } | null; + }; +}; export type InsertSubscriptionMutationVariables = Exact<{ data: SubscriptionsInsertInput; }>; - -export type InsertSubscriptionMutation = { __typename?: 'Mutation', subscriptionsCreateOne: { __typename?: 'SubscriptionsBasic', id: number, createdAt: string, updatedAt: string, displayName: string, category: SubscriptionCategoryEnum, sourceUrl: string, enabled: boolean, credentialId?: number | null } }; +export type InsertSubscriptionMutation = { + __typename?: 'Mutation'; + subscriptionsCreateOne: { + __typename?: 'SubscriptionsBasic'; + id: number; + createdAt: string; + updatedAt: string; + displayName: string; + category: SubscriptionCategoryEnum; + sourceUrl: string; + enabled: boolean; + credentialId?: number | null; + }; +}; export type UpdateSubscriptionsMutationVariables = Exact<{ data: SubscriptionsUpdateInput; filter: SubscriptionsFilterInput; }>; - -export type UpdateSubscriptionsMutation = { __typename?: 'Mutation', subscriptionsUpdate: Array<{ __typename?: 'SubscriptionsBasic', id: number, createdAt: string, updatedAt: string, displayName: string, category: SubscriptionCategoryEnum, sourceUrl: string, enabled: boolean }> }; +export type UpdateSubscriptionsMutation = { + __typename?: 'Mutation'; + subscriptionsUpdate: Array<{ + __typename?: 'SubscriptionsBasic'; + id: number; + createdAt: string; + updatedAt: string; + displayName: string; + category: SubscriptionCategoryEnum; + sourceUrl: string; + enabled: boolean; + }>; +}; export type DeleteSubscriptionsMutationVariables = Exact<{ filter?: InputMaybe; }>; - -export type DeleteSubscriptionsMutation = { __typename?: 'Mutation', subscriptionsDelete: number }; +export type DeleteSubscriptionsMutation = { + __typename?: 'Mutation'; + subscriptionsDelete: number; +}; export type GetSubscriptionDetailQueryVariables = Exact<{ id: Scalars['Int']['input']; }>; - -export type GetSubscriptionDetailQuery = { __typename?: 'Query', subscriptions: { __typename?: 'SubscriptionsConnection', nodes: Array<{ __typename?: 'Subscriptions', id: number, subscriberId: number, displayName: string, createdAt: string, updatedAt: string, category: SubscriptionCategoryEnum, sourceUrl: string, enabled: boolean, feed: { __typename?: 'FeedsConnection', nodes: Array<{ __typename?: 'Feeds', id: number, createdAt: string, updatedAt: string, token: string, feedType: FeedTypeEnum, feedSource: FeedSourceEnum }> }, subscriberTask: { __typename?: 'SubscriberTasksConnection', nodes: Array<{ __typename?: 'SubscriberTasks', id: string, taskType: SubscriberTaskTypeEnum, status: SubscriberTaskStatusEnum }> }, credential3rd?: { __typename?: 'Credential3rd', id: number, username?: string | null } | null, cron: { __typename?: 'CronConnection', nodes: Array<{ __typename?: 'Cron', id: number, cronExpr: string, nextRun?: string | null, lastRun?: string | null, lastError?: string | null, enabled: boolean, status: CronStatusEnum, lockedAt?: string | null, lockedBy?: string | null, createdAt: string, updatedAt: string, timeoutMs?: number | null, maxAttempts: number, priority: number, attempts: number, subscriberTaskCron?: SubscriberTaskType | null }> }, bangumi: { __typename?: 'BangumiConnection', nodes: Array<{ __typename?: 'Bangumi', createdAt: string, updatedAt: string, id: number, mikanBangumiId?: string | null, displayName: string, season: number, seasonRaw?: string | null, fansub?: string | null, mikanFansubId?: string | null, rssLink?: string | null, posterLink?: string | null, homepage?: string | null }> } }> } }; +export type GetSubscriptionDetailQuery = { + __typename?: 'Query'; + subscriptions: { + __typename?: 'SubscriptionsConnection'; + nodes: Array<{ + __typename?: 'Subscriptions'; + id: number; + subscriberId: number; + displayName: string; + createdAt: string; + updatedAt: string; + category: SubscriptionCategoryEnum; + sourceUrl: string; + enabled: boolean; + feed: { + __typename?: 'FeedsConnection'; + nodes: Array<{ + __typename?: 'Feeds'; + id: number; + createdAt: string; + updatedAt: string; + token: string; + feedType: FeedTypeEnum; + feedSource: FeedSourceEnum; + }>; + }; + subscriberTask: { + __typename?: 'SubscriberTasksConnection'; + nodes: Array<{ + __typename?: 'SubscriberTasks'; + id: string; + taskType: SubscriberTaskTypeEnum; + status: SubscriberTaskStatusEnum; + }>; + }; + credential3rd?: { + __typename?: 'Credential3rd'; + id: number; + username?: string | null; + } | null; + cron: { + __typename?: 'CronConnection'; + nodes: Array<{ + __typename?: 'Cron'; + id: number; + cronExpr: string; + nextRun?: string | null; + lastRun?: string | null; + lastError?: string | null; + enabled: boolean; + status: CronStatusEnum; + lockedAt?: string | null; + lockedBy?: string | null; + createdAt: string; + updatedAt: string; + timeoutMs?: number | null; + maxAttempts: number; + priority: number; + attempts: number; + subscriberTaskCron?: SubscriberTaskType | null; + }>; + }; + bangumi: { + __typename?: 'BangumiConnection'; + nodes: Array<{ + __typename?: 'Bangumi'; + createdAt: string; + updatedAt: string; + id: number; + mikanBangumiId?: string | null; + displayName: string; + season: number; + seasonRaw?: string | null; + fansub?: string | null; + mikanFansubId?: string | null; + rssLink?: string | null; + posterLink?: string | null; + homepage?: string | null; + }>; + }; + }>; + }; +}; export type GetTasksQueryVariables = Exact<{ filter: SubscriberTasksFilterInput; @@ -2390,49 +2631,2227 @@ export type GetTasksQueryVariables = Exact<{ pagination: PaginationInput; }>; - -export type GetTasksQuery = { __typename?: 'Query', subscriberTasks: { __typename?: 'SubscriberTasksConnection', nodes: Array<{ __typename?: 'SubscriberTasks', id: string, job: SubscriberTaskType, taskType: SubscriberTaskTypeEnum, status: SubscriberTaskStatusEnum, attempts: number, maxAttempts: number, runAt: string, lastError?: string | null, lockAt?: string | null, lockBy?: string | null, doneAt?: string | null, priority: number, subscription?: { __typename?: 'Subscriptions', displayName: string, sourceUrl: string, cron: { __typename?: 'CronConnection', nodes: Array<{ __typename?: 'Cron', id: number, cronExpr: string, nextRun?: string | null, lastRun?: string | null, lastError?: string | null, status: CronStatusEnum, lockedAt?: string | null, lockedBy?: string | null, createdAt: string, updatedAt: string, timeoutMs?: number | null, maxAttempts: number, priority: number, attempts: number }> } } | null }>, paginationInfo?: { __typename?: 'PaginationInfo', total: number, pages: number } | null } }; +export type GetTasksQuery = { + __typename?: 'Query'; + subscriberTasks: { + __typename?: 'SubscriberTasksConnection'; + nodes: Array<{ + __typename?: 'SubscriberTasks'; + id: string; + job: SubscriberTaskType; + taskType: SubscriberTaskTypeEnum; + status: SubscriberTaskStatusEnum; + attempts: number; + maxAttempts: number; + runAt: string; + lastError?: string | null; + lockAt?: string | null; + lockBy?: string | null; + doneAt?: string | null; + priority: number; + subscription?: { + __typename?: 'Subscriptions'; + displayName: string; + sourceUrl: string; + } | null; + cron?: { + __typename?: 'Cron'; + id: number; + cronExpr: string; + nextRun?: string | null; + lastRun?: string | null; + lastError?: string | null; + status: CronStatusEnum; + lockedAt?: string | null; + lockedBy?: string | null; + createdAt: string; + updatedAt: string; + timeoutMs?: number | null; + maxAttempts: number; + priority: number; + attempts: number; + } | null; + }>; + paginationInfo?: { + __typename?: 'PaginationInfo'; + total: number; + pages: number; + } | null; + }; +}; export type InsertSubscriberTaskMutationVariables = Exact<{ data: SubscriberTasksInsertInput; }>; - -export type InsertSubscriberTaskMutation = { __typename?: 'Mutation', subscriberTasksCreateOne: { __typename?: 'SubscriberTasksBasic', id: string } }; +export type InsertSubscriberTaskMutation = { + __typename?: 'Mutation'; + subscriberTasksCreateOne: { __typename?: 'SubscriberTasksBasic'; id: string }; +}; export type DeleteTasksMutationVariables = Exact<{ filter: SubscriberTasksFilterInput; }>; - -export type DeleteTasksMutation = { __typename?: 'Mutation', subscriberTasksDelete: number }; +export type DeleteTasksMutation = { + __typename?: 'Mutation'; + subscriberTasksDelete: number; +}; export type RetryTasksMutationVariables = Exact<{ filter: SubscriberTasksFilterInput; }>; +export type RetryTasksMutation = { + __typename?: 'Mutation'; + subscriberTasksRetryOne: { + __typename?: 'SubscriberTasksBasic'; + id: string; + job: SubscriberTaskType; + taskType: SubscriberTaskTypeEnum; + status: SubscriberTaskStatusEnum; + attempts: number; + maxAttempts: number; + runAt: string; + lastError?: string | null; + lockAt?: string | null; + lockBy?: string | null; + doneAt?: string | null; + priority: number; + }; +}; -export type RetryTasksMutation = { __typename?: 'Mutation', subscriberTasksRetryOne: { __typename?: 'SubscriberTasksBasic', id: string, job: SubscriberTaskType, taskType: SubscriberTaskTypeEnum, status: SubscriberTaskStatusEnum, attempts: number, maxAttempts: number, runAt: string, lastError?: string | null, lockAt?: string | null, lockBy?: string | null, doneAt?: string | null, priority: number } }; - - -export const GetCredential3rdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCredential3rd"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Credential3rdFilterInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Credential3rdOrderInput"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"pagination"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PaginationInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"credential3rd"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}},{"kind":"Argument","name":{"kind":"Name","value":"pagination"},"value":{"kind":"Variable","name":{"kind":"Name","value":"pagination"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"cookies"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"password"}},{"kind":"Field","name":{"kind":"Name","value":"userAgent"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"credentialType"}}]}},{"kind":"Field","name":{"kind":"Name","value":"paginationInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"total"}},{"kind":"Field","name":{"kind":"Name","value":"pages"}}]}}]}}]}}]} as unknown as DocumentNode; -export const InsertCredential3rdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"InsertCredential3rd"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Credential3rdInsertInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"credential3rdCreateOne"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"data"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"cookies"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"password"}},{"kind":"Field","name":{"kind":"Name","value":"userAgent"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"credentialType"}}]}}]}}]} as unknown as DocumentNode; -export const UpdateCredential3rdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateCredential3rd"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Credential3rdUpdateInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Credential3rdFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"credential3rdUpdate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"data"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"cookies"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"password"}},{"kind":"Field","name":{"kind":"Name","value":"userAgent"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"credentialType"}}]}}]}}]} as unknown as DocumentNode; -export const DeleteCredential3rdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteCredential3rd"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Credential3rdFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"credential3rdDelete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}]}]}}]} as unknown as DocumentNode; -export const GetCredential3rdDetailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCredential3rdDetail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"credential3rd"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"cookies"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"password"}},{"kind":"Field","name":{"kind":"Name","value":"userAgent"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"credentialType"}}]}}]}}]}}]} as unknown as DocumentNode; -export const CheckCredential3rdAvailableDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CheckCredential3rdAvailable"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Credential3rdFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"credential3rdCheckAvailable"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"available"}}]}}]}}]} as unknown as DocumentNode; -export const GetCronsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCrons"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CronFilterInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CronOrderInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"pagination"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PaginationInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cron"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"pagination"},"value":{"kind":"Variable","name":{"kind":"Name","value":"pagination"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"cronExpr"}},{"kind":"Field","name":{"kind":"Name","value":"nextRun"}},{"kind":"Field","name":{"kind":"Name","value":"lastRun"}},{"kind":"Field","name":{"kind":"Name","value":"lastError"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"lockedAt"}},{"kind":"Field","name":{"kind":"Name","value":"lockedBy"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutMs"}},{"kind":"Field","name":{"kind":"Name","value":"maxAttempts"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"attempts"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"subscriberTaskCron"}},{"kind":"Field","name":{"kind":"Name","value":"subscriberTask"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"job"}},{"kind":"Field","name":{"kind":"Name","value":"taskType"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"attempts"}},{"kind":"Field","name":{"kind":"Name","value":"maxAttempts"}},{"kind":"Field","name":{"kind":"Name","value":"runAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastError"}},{"kind":"Field","name":{"kind":"Name","value":"lockAt"}},{"kind":"Field","name":{"kind":"Name","value":"lockBy"}},{"kind":"Field","name":{"kind":"Name","value":"doneAt"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"subscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrl"}}]}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"paginationInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"total"}},{"kind":"Field","name":{"kind":"Name","value":"pages"}}]}}]}}]}}]} as unknown as DocumentNode; -export const DeleteCronsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteCrons"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CronFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cronDelete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}]}]}}]} as unknown as DocumentNode; -export const UpdateCronsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateCrons"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CronFilterInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CronUpdateInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cronUpdate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}},{"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":"cronExpr"}},{"kind":"Field","name":{"kind":"Name","value":"nextRun"}},{"kind":"Field","name":{"kind":"Name","value":"lastRun"}},{"kind":"Field","name":{"kind":"Name","value":"lastError"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"lockedAt"}},{"kind":"Field","name":{"kind":"Name","value":"lockedBy"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutMs"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"maxAttempts"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"attempts"}},{"kind":"Field","name":{"kind":"Name","value":"subscriberTaskCron"}}]}}]}}]} as unknown as DocumentNode; -export const InsertCronDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"InsertCron"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CronInsertInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cronCreateOne"},"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":"cronExpr"}},{"kind":"Field","name":{"kind":"Name","value":"nextRun"}},{"kind":"Field","name":{"kind":"Name","value":"lastRun"}},{"kind":"Field","name":{"kind":"Name","value":"lastError"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"lockedAt"}},{"kind":"Field","name":{"kind":"Name","value":"lockedBy"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutMs"}},{"kind":"Field","name":{"kind":"Name","value":"maxAttempts"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"attempts"}},{"kind":"Field","name":{"kind":"Name","value":"subscriberTaskCron"}}]}}]}}]} as unknown as DocumentNode; -export const InsertFeedDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"InsertFeed"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"FeedsInsertInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"feedsCreateOne"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"data"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"feedType"}},{"kind":"Field","name":{"kind":"Name","value":"token"}}]}}]}}]} as unknown as DocumentNode; -export const DeleteFeedDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteFeed"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"FeedsFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"feedsDelete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}]}]}}]} as unknown as DocumentNode; -export const GetSubscriptionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSubscriptions"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriptionsFilterInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriptionsOrderInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"pagination"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PaginationInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriptions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"pagination"},"value":{"kind":"Variable","name":{"kind":"Name","value":"pagination"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"category"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"credentialId"}}]}},{"kind":"Field","name":{"kind":"Name","value":"paginationInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"total"}},{"kind":"Field","name":{"kind":"Name","value":"pages"}}]}}]}}]}}]} as unknown as DocumentNode; -export const InsertSubscriptionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"InsertSubscription"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriptionsInsertInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriptionsCreateOne"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"data"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"category"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"credentialId"}}]}}]}}]} as unknown as DocumentNode; -export const UpdateSubscriptionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateSubscriptions"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriptionsUpdateInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriptionsFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriptionsUpdate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"data"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"category"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}}]}}]}}]} as unknown as DocumentNode; -export const DeleteSubscriptionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteSubscriptions"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriptionsFilterInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriptionsDelete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}]}]}}]} as unknown as DocumentNode; -export const GetSubscriptionDetailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSubscriptionDetail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriptions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"subscriberId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"category"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"feed"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"feedType"}},{"kind":"Field","name":{"kind":"Name","value":"feedSource"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"subscriberTask"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"taskType"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"credential3rd"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"Field","name":{"kind":"Name","value":"cron"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"cronExpr"}},{"kind":"Field","name":{"kind":"Name","value":"nextRun"}},{"kind":"Field","name":{"kind":"Name","value":"lastRun"}},{"kind":"Field","name":{"kind":"Name","value":"lastError"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"lockedAt"}},{"kind":"Field","name":{"kind":"Name","value":"lockedBy"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutMs"}},{"kind":"Field","name":{"kind":"Name","value":"maxAttempts"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"attempts"}},{"kind":"Field","name":{"kind":"Name","value":"subscriberTaskCron"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"bangumi"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"mikanBangumiId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"season"}},{"kind":"Field","name":{"kind":"Name","value":"seasonRaw"}},{"kind":"Field","name":{"kind":"Name","value":"fansub"}},{"kind":"Field","name":{"kind":"Name","value":"mikanFansubId"}},{"kind":"Field","name":{"kind":"Name","value":"rssLink"}},{"kind":"Field","name":{"kind":"Name","value":"posterLink"}},{"kind":"Field","name":{"kind":"Name","value":"homepage"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; -export const GetTasksDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTasks"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriberTasksFilterInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriberTasksOrderInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"pagination"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PaginationInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriberTasks"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"pagination"},"value":{"kind":"Variable","name":{"kind":"Name","value":"pagination"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"job"}},{"kind":"Field","name":{"kind":"Name","value":"taskType"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"attempts"}},{"kind":"Field","name":{"kind":"Name","value":"maxAttempts"}},{"kind":"Field","name":{"kind":"Name","value":"runAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastError"}},{"kind":"Field","name":{"kind":"Name","value":"lockAt"}},{"kind":"Field","name":{"kind":"Name","value":"lockBy"}},{"kind":"Field","name":{"kind":"Name","value":"doneAt"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"subscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"cron"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"cronExpr"}},{"kind":"Field","name":{"kind":"Name","value":"nextRun"}},{"kind":"Field","name":{"kind":"Name","value":"lastRun"}},{"kind":"Field","name":{"kind":"Name","value":"lastError"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"lockedAt"}},{"kind":"Field","name":{"kind":"Name","value":"lockedBy"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutMs"}},{"kind":"Field","name":{"kind":"Name","value":"maxAttempts"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"attempts"}}]}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"paginationInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"total"}},{"kind":"Field","name":{"kind":"Name","value":"pages"}}]}}]}}]}}]} as unknown as DocumentNode; -export const InsertSubscriberTaskDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"InsertSubscriberTask"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriberTasksInsertInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriberTasksCreateOne"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"data"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; -export const DeleteTasksDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteTasks"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriberTasksFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriberTasksDelete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}]}]}}]} as unknown as DocumentNode; -export const RetryTasksDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RetryTasks"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriberTasksFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subscriberTasksRetryOne"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"job"}},{"kind":"Field","name":{"kind":"Name","value":"taskType"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"attempts"}},{"kind":"Field","name":{"kind":"Name","value":"maxAttempts"}},{"kind":"Field","name":{"kind":"Name","value":"runAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastError"}},{"kind":"Field","name":{"kind":"Name","value":"lockAt"}},{"kind":"Field","name":{"kind":"Name","value":"lockBy"}},{"kind":"Field","name":{"kind":"Name","value":"doneAt"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const GetCredential3rdDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetCredential3rd' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Credential3rdFilterInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' }, + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Credential3rdOrderInput' }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'pagination' }, + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'PaginationInput' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'credential3rd' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'orderBy' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'pagination' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'pagination' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'cookies' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'username' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'password' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'userAgent' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'credentialType' }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'paginationInfo' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'total' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pages' } }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + GetCredential3rdQuery, + GetCredential3rdQueryVariables +>; +export const InsertCredential3rdDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'InsertCredential3rd' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'data' } }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Credential3rdInsertInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'credential3rdCreateOne' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'data' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'data' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'cookies' } }, + { kind: 'Field', name: { kind: 'Name', value: 'username' } }, + { kind: 'Field', name: { kind: 'Name', value: 'password' } }, + { kind: 'Field', name: { kind: 'Name', value: 'userAgent' } }, + { kind: 'Field', name: { kind: 'Name', value: 'createdAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'credentialType' }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + InsertCredential3rdMutation, + InsertCredential3rdMutationVariables +>; +export const UpdateCredential3rdDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'UpdateCredential3rd' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'data' } }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Credential3rdUpdateInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Credential3rdFilterInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'credential3rdUpdate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'data' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'data' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'cookies' } }, + { kind: 'Field', name: { kind: 'Name', value: 'username' } }, + { kind: 'Field', name: { kind: 'Name', value: 'password' } }, + { kind: 'Field', name: { kind: 'Name', value: 'userAgent' } }, + { kind: 'Field', name: { kind: 'Name', value: 'createdAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'credentialType' }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + UpdateCredential3rdMutation, + UpdateCredential3rdMutationVariables +>; +export const DeleteCredential3rdDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'DeleteCredential3rd' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Credential3rdFilterInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'credential3rdDelete' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + DeleteCredential3rdMutation, + DeleteCredential3rdMutationVariables +>; +export const GetCredential3rdDetailDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetCredential3rdDetail' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'credential3rd' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'id' }, + }, + }, + ], + }, + }, + ], + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'cookies' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'username' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'password' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'userAgent' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'credentialType' }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + GetCredential3rdDetailQuery, + GetCredential3rdDetailQueryVariables +>; +export const CheckCredential3rdAvailableDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'CheckCredential3rdAvailable' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Credential3rdFilterInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'credential3rdCheckAvailable' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'available' } }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + CheckCredential3rdAvailableMutation, + CheckCredential3rdAvailableMutationVariables +>; +export const GetCronsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetCrons' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'CronFilterInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'CronOrderInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'pagination' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'PaginationInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'cron' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'pagination' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'pagination' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'orderBy' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'cronExpr' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'nextRun' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lastRun' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lastError' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'status' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockedBy' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'timeoutMs' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'maxAttempts' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'priority' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'attempts' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'enabled' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberTaskCron' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberTask' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'id' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'job' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'taskType' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'status' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'attempts' }, + }, + { + kind: 'Field', + name: { + kind: 'Name', + value: 'maxAttempts', + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'runAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lastError' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockBy' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'doneAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'priority' }, + }, + { + kind: 'Field', + name: { + kind: 'Name', + value: 'subscription', + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { + kind: 'Name', + value: 'displayName', + }, + }, + { + kind: 'Field', + name: { + kind: 'Name', + value: 'sourceUrl', + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'paginationInfo' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'total' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pages' } }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const DeleteCronsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'DeleteCrons' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'CronFilterInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'cronDelete' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const UpdateCronsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'UpdateCrons' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'CronFilterInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'data' } }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'CronUpdateInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'cronUpdate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + { + 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: 'cronExpr' } }, + { kind: 'Field', name: { kind: 'Name', value: 'nextRun' } }, + { kind: 'Field', name: { kind: 'Name', value: 'lastRun' } }, + { kind: 'Field', name: { kind: 'Name', value: 'lastError' } }, + { kind: 'Field', name: { kind: 'Name', value: 'status' } }, + { kind: 'Field', name: { kind: 'Name', value: 'lockedAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'lockedBy' } }, + { kind: 'Field', name: { kind: 'Name', value: 'createdAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timeoutMs' } }, + { kind: 'Field', name: { kind: 'Name', value: 'enabled' } }, + { kind: 'Field', name: { kind: 'Name', value: 'maxAttempts' } }, + { kind: 'Field', name: { kind: 'Name', value: 'priority' } }, + { kind: 'Field', name: { kind: 'Name', value: 'attempts' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberTaskCron' }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const InsertCronDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'InsertCron' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'data' } }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'CronInsertInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'cronCreateOne' }, + 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: 'cronExpr' } }, + { kind: 'Field', name: { kind: 'Name', value: 'nextRun' } }, + { kind: 'Field', name: { kind: 'Name', value: 'lastRun' } }, + { kind: 'Field', name: { kind: 'Name', value: 'lastError' } }, + { kind: 'Field', name: { kind: 'Name', value: 'status' } }, + { kind: 'Field', name: { kind: 'Name', value: 'lockedAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'lockedBy' } }, + { kind: 'Field', name: { kind: 'Name', value: 'createdAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'enabled' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timeoutMs' } }, + { kind: 'Field', name: { kind: 'Name', value: 'maxAttempts' } }, + { kind: 'Field', name: { kind: 'Name', value: 'priority' } }, + { kind: 'Field', name: { kind: 'Name', value: 'attempts' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberTaskCron' }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const InsertFeedDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'InsertFeed' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'data' } }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'FeedsInsertInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'feedsCreateOne' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'data' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'data' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'createdAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'feedType' } }, + { kind: 'Field', name: { kind: 'Name', value: 'token' } }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const DeleteFeedDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'DeleteFeed' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'FeedsFilterInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'feedsDelete' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const GetSubscriptionsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetSubscriptions' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriptionsFilterInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriptionsOrderInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'pagination' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'PaginationInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriptions' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'pagination' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'pagination' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'orderBy' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'displayName' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'category' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'sourceUrl' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'enabled' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'credentialId' }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'paginationInfo' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'total' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pages' } }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + GetSubscriptionsQuery, + GetSubscriptionsQueryVariables +>; +export const InsertSubscriptionDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'InsertSubscription' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'data' } }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriptionsInsertInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriptionsCreateOne' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'data' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'data' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'createdAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'displayName' } }, + { kind: 'Field', name: { kind: 'Name', value: 'category' } }, + { kind: 'Field', name: { kind: 'Name', value: 'sourceUrl' } }, + { kind: 'Field', name: { kind: 'Name', value: 'enabled' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'credentialId' }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + InsertSubscriptionMutation, + InsertSubscriptionMutationVariables +>; +export const UpdateSubscriptionsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'UpdateSubscriptions' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'data' } }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriptionsUpdateInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriptionsFilterInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriptionsUpdate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'data' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'data' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'createdAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'displayName' } }, + { kind: 'Field', name: { kind: 'Name', value: 'category' } }, + { kind: 'Field', name: { kind: 'Name', value: 'sourceUrl' } }, + { kind: 'Field', name: { kind: 'Name', value: 'enabled' } }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + UpdateSubscriptionsMutation, + UpdateSubscriptionsMutationVariables +>; +export const DeleteSubscriptionsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'DeleteSubscriptions' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriptionsFilterInput' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriptionsDelete' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + DeleteSubscriptionsMutation, + DeleteSubscriptionsMutationVariables +>; +export const GetSubscriptionDetailDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetSubscriptionDetail' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriptions' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'id' }, + }, + }, + ], + }, + }, + ], + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberId' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'displayName' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'category' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'sourceUrl' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'enabled' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'feed' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'id' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'token' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'feedType' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'feedSource' }, + }, + ], + }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberTask' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'id' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'taskType' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'status' }, + }, + ], + }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'credential3rd' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'id' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'username' }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'cron' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'id' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'cronExpr' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'nextRun' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lastRun' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lastError' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'enabled' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'status' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockedBy' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'timeoutMs' }, + }, + { + kind: 'Field', + name: { + kind: 'Name', + value: 'maxAttempts', + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'priority' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'attempts' }, + }, + { + kind: 'Field', + name: { + kind: 'Name', + value: 'subscriberTaskCron', + }, + }, + ], + }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'bangumi' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'id' }, + }, + { + kind: 'Field', + name: { + kind: 'Name', + value: 'mikanBangumiId', + }, + }, + { + kind: 'Field', + name: { + kind: 'Name', + value: 'displayName', + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'season' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'seasonRaw' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'fansub' }, + }, + { + kind: 'Field', + name: { + kind: 'Name', + value: 'mikanFansubId', + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'rssLink' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'posterLink' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'homepage' }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + GetSubscriptionDetailQuery, + GetSubscriptionDetailQueryVariables +>; +export const GetTasksDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetTasks' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriberTasksFilterInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriberTasksOrderInput' }, + }, + }, + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'pagination' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'PaginationInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberTasks' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'pagination' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'pagination' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'orderBy' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'nodes' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'job' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'taskType' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'status' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'attempts' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'maxAttempts' }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'runAt' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lastError' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockBy' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'doneAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'priority' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'subscription' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'displayName' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'sourceUrl' }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'cron' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'id' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'cronExpr' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'nextRun' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lastRun' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lastError' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'status' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lockedBy' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'updatedAt' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'timeoutMs' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'maxAttempts' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'priority' }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'attempts' }, + }, + ], + }, + }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'paginationInfo' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'total' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pages' } }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const InsertSubscriberTaskDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'InsertSubscriberTask' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'data' } }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriberTasksInsertInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberTasksCreateOne' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'data' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'data' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode< + InsertSubscriberTaskMutation, + InsertSubscriberTaskMutationVariables +>; +export const DeleteTasksDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'DeleteTasks' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriberTasksFilterInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberTasksDelete' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const RetryTasksDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'RetryTasks' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SubscriberTasksFilterInput' }, + }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'subscriberTasksRetryOne' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'filter' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'filter' }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'job' } }, + { kind: 'Field', name: { kind: 'Name', value: 'taskType' } }, + { kind: 'Field', name: { kind: 'Name', value: 'status' } }, + { kind: 'Field', name: { kind: 'Name', value: 'attempts' } }, + { kind: 'Field', name: { kind: 'Name', value: 'maxAttempts' } }, + { kind: 'Field', name: { kind: 'Name', value: 'runAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'lastError' } }, + { kind: 'Field', name: { kind: 'Name', value: 'lockAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'lockBy' } }, + { kind: 'Field', name: { kind: 'Name', value: 'doneAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'priority' } }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; diff --git a/apps/webui/src/infra/graphql/graphql.service.ts b/apps/webui/src/infra/graphql/graphql.service.ts index c1970f2..0df26d2 100644 --- a/apps/webui/src/infra/graphql/graphql.service.ts +++ b/apps/webui/src/infra/graphql/graphql.service.ts @@ -1,8 +1,8 @@ -import { AUTH_PROVIDER } from '@/infra/auth/auth.provider'; -import { ApolloClient, InMemoryCache, createHttpLink } from '@apollo/client'; +import { ApolloClient, createHttpLink, InMemoryCache } from '@apollo/client'; import { setContext } from '@apollo/client/link/context'; import { Injectable, inject } from '@outposts/injection-js'; import { firstValueFrom } from 'rxjs'; +import { AUTH_PROVIDER } from '@/infra/auth/auth.provider'; @Injectable() export class GraphQLService { diff --git a/apps/webui/src/presentation/routes/_app/credential3rd/create.tsx b/apps/webui/src/presentation/routes/_app/credential3rd/create.tsx index 4c0250e..d074f9e 100644 --- a/apps/webui/src/presentation/routes/_app/credential3rd/create.tsx +++ b/apps/webui/src/presentation/routes/_app/credential3rd/create.tsx @@ -1,3 +1,13 @@ +import { useMutation } from '@apollo/client'; +import { + createFileRoute, + useCanGoBack, + useNavigate, + useRouter, +} from '@tanstack/react-router'; +import { type } from 'arktype'; +import { Loader2, Save } from 'lucide-react'; +import { toast } from 'sonner'; import { Button } from '@/components/ui/button'; import { Card, @@ -24,7 +34,9 @@ import { INSERT_CREDENTIAL_3RD, } from '@/domains/recorder/schema/credential3rd'; import { useInject } from '@/infra/di/inject'; +import { compatFormDefaultValues } from '@/infra/forms/compat'; import { + type Credential3rdInsertInput, Credential3rdTypeEnum, type InsertCredential3rdMutation, type InsertCredential3rdMutationVariables, @@ -35,16 +47,6 @@ import { CreateCompleteActionSchema, } from '@/infra/routes/nav'; import type { RouteStateDataOption } from '@/infra/routes/traits'; -import { useMutation } from '@apollo/client'; -import { - createFileRoute, - useCanGoBack, - useNavigate, - useRouter, -} from '@tanstack/react-router'; -import { type } from 'arktype'; -import { Loader2, Save } from 'lucide-react'; -import { toast } from 'sonner'; const RouteSearchSchema = type({ completeAction: CreateCompleteActionSchema.optional(), @@ -98,21 +100,24 @@ function CredentialCreateRouteComponent() { }); const form = useAppForm({ - defaultValues: { + defaultValues: compatFormDefaultValues< + Credential3rdInsertInput, + 'credentialType' | 'username' | 'password' | 'userAgent' + >({ credentialType: Credential3rdTypeEnum.Mikan, username: '', password: '', userAgent: '', - }, + }), validators: { onChangeAsync: Credential3rdInsertSchema, onChangeAsyncDebounceMs: 300, onSubmit: Credential3rdInsertSchema, }, - onSubmit: async (form) => { + onSubmit: async (submittedForm) => { const value = { - ...form.value, - userAgent: form.value.userAgent || platformService.userAgent, + ...submittedForm.value, + userAgent: submittedForm.value.userAgent || platformService.userAgent, }; await insertCredential3rd({ variables: { @@ -183,7 +188,7 @@ function CredentialCreateRouteComponent() { field.handleChange(e.target.value)} placeholder="Please enter username" @@ -207,7 +212,7 @@ function CredentialCreateRouteComponent() { id={field.name} name={field.name} type="password" - value={field.state.value} + value={field.state.value ?? ''} onBlur={field.handleBlur} onChange={(e) => field.handleChange(e.target.value)} placeholder="Please enter password" diff --git a/apps/webui/src/presentation/routes/_app/credential3rd/edit.$id.tsx b/apps/webui/src/presentation/routes/_app/credential3rd/edit.$id.tsx index 8bb3275..60e8bc9 100644 --- a/apps/webui/src/presentation/routes/_app/credential3rd/edit.$id.tsx +++ b/apps/webui/src/presentation/routes/_app/credential3rd/edit.$id.tsx @@ -1,3 +1,8 @@ +import { useMutation, useQuery } from '@apollo/client'; +import { createFileRoute } from '@tanstack/react-router'; +import { Eye, EyeOff, Save } from 'lucide-react'; +import { useCallback, useState } from 'react'; +import { toast } from 'sonner'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { @@ -32,18 +37,15 @@ import { apolloErrorToMessage, getApolloQueryError, } from '@/infra/errors/apollo'; +import { compatFormDefaultValues } from '@/infra/forms/compat'; import type { Credential3rdTypeEnum, + Credential3rdUpdateInput, GetCredential3rdDetailQuery, UpdateCredential3rdMutation, UpdateCredential3rdMutationVariables, } from '@/infra/graphql/gql/graphql'; import type { RouteStateDataOption } from '@/infra/routes/traits'; -import { useMutation, useQuery } from '@apollo/client'; -import { createFileRoute } from '@tanstack/react-router'; -import { Eye, EyeOff, Save } from 'lucide-react'; -import { useCallback, useState } from 'react'; -import { toast } from 'sonner'; export const Route = createFileRoute('/_app/credential3rd/edit/$id')({ component: Credential3rdEditRouteComponent, @@ -77,18 +79,21 @@ function FormView({ }); const form = useAppForm({ - defaultValues: { + defaultValues: compatFormDefaultValues< + Credential3rdUpdateInput, + 'credentialType' | 'username' | 'password' | 'userAgent' + >({ credentialType: credential.credentialType, - username: credential.username, - password: credential.password, - userAgent: credential.userAgent, - }, + username: credential.username ?? '', + password: credential.password ?? '', + userAgent: credential.userAgent ?? '', + }), validators: { onBlur: Credential3rdUpdateSchema, onSubmit: Credential3rdUpdateSchema, }, - onSubmit: (form) => { - const value = form.value; + onSubmit: (submittedForm) => { + const value = submittedForm.value; updateCredential({ variables: { data: value, @@ -238,7 +243,7 @@ function Credential3rdEditRouteComponent() { const { loading, error, data, refetch } = useQuery(GET_CREDENTIAL_3RD_DETAIL, { variables: { - id: Number.parseInt(id), + id: Number.parseInt(id, 10), }, }); @@ -246,10 +251,10 @@ function Credential3rdEditRouteComponent() { const onCompleted = useCallback(async () => { const refetchResult = await refetch(); - const error = getApolloQueryError(refetchResult); - if (error) { + const _error = getApolloQueryError(refetchResult); + if (_error) { toast.error('Update credential failed', { - description: apolloErrorToMessage(error), + description: apolloErrorToMessage(_error), }); } else { toast.success('Update credential successfully'); diff --git a/apps/webui/src/presentation/routes/_app/subscriptions/create.tsx b/apps/webui/src/presentation/routes/_app/subscriptions/create.tsx index ec93236..856d4ca 100644 --- a/apps/webui/src/presentation/routes/_app/subscriptions/create.tsx +++ b/apps/webui/src/presentation/routes/_app/subscriptions/create.tsx @@ -1,3 +1,7 @@ +import { useMutation } from '@apollo/client'; +import { createFileRoute, useNavigate } from '@tanstack/react-router'; +import { Loader2, Save } from 'lucide-react'; +import { toast } from 'sonner'; import { Button } from '@/components/ui/button'; import { Card, @@ -27,6 +31,7 @@ import { } from '@/domains/recorder/schema/subscriptions'; import { SubscriptionService } from '@/domains/recorder/services/subscription.service'; import { useInject } from '@/infra/di/inject'; +import { compatFormDefaultValues } from '@/infra/forms/compat'; import { Credential3rdTypeEnum, type InsertSubscriptionMutation, @@ -34,11 +39,6 @@ import { SubscriptionCategoryEnum, } from '@/infra/graphql/gql/graphql'; import type { RouteStateDataOption } from '@/infra/routes/traits'; -import { useMutation } from '@apollo/client'; -import { createFileRoute } from '@tanstack/react-router'; -import { useNavigate } from '@tanstack/react-router'; -import { Loader2, Save } from 'lucide-react'; -import { toast } from 'sonner'; import { Credential3rdSelectContent } from './-credential3rd-select'; export const Route = createFileRoute('/_app/subscriptions/create')({ @@ -71,22 +71,24 @@ function SubscriptionCreateRouteComponent() { }); const form = useAppForm({ - defaultValues: { + defaultValues: compatFormDefaultValues({ displayName: '', - category: undefined, + category: '', enabled: true, sourceUrl: '', - credentialId: '', - year: undefined, + credentialId: Number.NaN, + year: Number.NaN, seasonStr: '', - } as unknown as SubscriptionForm, + }), validators: { onChangeAsync: SubscriptionFormSchema, onChangeAsyncDebounceMs: 300, onSubmit: SubscriptionFormSchema, }, - onSubmit: async (form) => { - const input = subscriptionService.transformInsertFormToInput(form.value); + onSubmit: async (submittedForm) => { + const input = subscriptionService.transformInsertFormToInput( + submittedForm.value + ); await insertSubscription({ variables: { data: input, @@ -119,30 +121,6 @@ function SubscriptionCreateRouteComponent() { }} className="space-y-6" > - - {(field) => ( -
- - field.handleChange(e.target.value)} - placeholder="Please enter display name" - autoComplete="off" - /> - {field.state.meta.errors && ( - - )} -
- )} -
- {(field) => (
@@ -192,7 +170,7 @@ function SubscriptionCreateRouteComponent() { field.handleChange(e.target.value)} + placeholder="Please enter display name" + autoComplete="off" + /> + {field.state.meta.errors && ( + + )} +
+ )} +
{(field) => (
diff --git a/apps/webui/src/presentation/routes/_app/subscriptions/edit.$id.tsx b/apps/webui/src/presentation/routes/_app/subscriptions/edit.$id.tsx index 5a4c698..7e246fe 100644 --- a/apps/webui/src/presentation/routes/_app/subscriptions/edit.$id.tsx +++ b/apps/webui/src/presentation/routes/_app/subscriptions/edit.$id.tsx @@ -1,3 +1,8 @@ +import { useMutation, useQuery } from '@apollo/client'; +import { createFileRoute } from '@tanstack/react-router'; +import { Save } from 'lucide-react'; +import { useCallback, useMemo } from 'react'; +import { toast } from 'sonner'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { @@ -36,6 +41,7 @@ import { apolloErrorToMessage, getApolloQueryError, } from '@/infra/errors/apollo'; +import { compatFormDefaultValues } from '@/infra/forms/compat'; import { Credential3rdTypeEnum, type GetSubscriptionDetailQuery, @@ -44,11 +50,6 @@ import { type UpdateSubscriptionsMutationVariables, } from '@/infra/graphql/gql/graphql'; import type { RouteStateDataOption } from '@/infra/routes/traits'; -import { useMutation, useQuery } from '@apollo/client'; -import { createFileRoute } from '@tanstack/react-router'; -import { Save } from 'lucide-react'; -import { useCallback, useMemo } from 'react'; -import { toast } from 'sonner'; import { Credential3rdSelectContent } from './-credential3rd-select'; export const Route = createFileRoute('/_app/subscriptions/edit/$id')({ @@ -100,7 +101,9 @@ function FormView({ category: subscription.category, enabled: subscription.enabled, sourceUrl: subscription.sourceUrl, - credentialId: subscription.credential3rd?.id || '', + credentialId: subscription.credential3rd?.id ?? Number.NaN, + year: Number.NaN, + seasonStr: '', }; if ( @@ -118,14 +121,16 @@ function FormView({ }, [subscription, sourceUrlMeta]); const form = useAppForm({ - defaultValues: defaultValues as unknown as SubscriptionForm, + defaultValues: compatFormDefaultValues(defaultValues), validators: { onChangeAsync: SubscriptionFormSchema, onChangeAsyncDebounceMs: 300, onSubmit: SubscriptionFormSchema, }, - onSubmit: async (form) => { - const input = subscriptionService.transformInsertFormToInput(form.value); + onSubmit: async (submittedForm) => { + const input = subscriptionService.transformInsertFormToInput( + submittedForm.value + ); await updateSubscription({ variables: { @@ -217,7 +222,7 @@ function FormView({