import { z } from 'zod';
import * as Cast from './cast.js';
import { TEST } from '@termsurf/form';
import * as code from './code.js';
export const AddAudioToVideoWithFfmpegModel = z.object({
    inputVideoPath: z.string(),
    inputAudioPath: z.string(),
    outputPath: z.string(),
    audioCodec: z.string(),
    fit: z.boolean(),
});
export const ArchiveFormatModel = z.enum(Cast.ARCHIVE_FORMAT);
export const ArchiveWithRarModel = z.object({
    input: z.object({
        format: z.string(),
        path: z.string(),
    }),
    output: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const ArchiveWithZipModel = z.object({
    input: z.object({
        path: z.string(),
    }),
    output: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const AssemblySyntaxModel = z.enum(Cast.ASSEMBLY_SYNTAX);
export const BackendCompilationOutputModel = z.enum(Cast.BACKEND_COMPILATION_OUTPUT);
export const BuildBaseFileInputModel = z
    .object({
    tool: z.optional(z.string()),
    input: z
        .object({
        file: z
            .object({
            path: z.string(),
        })
            .passthrough(),
    })
        .passthrough(),
    output: z
        .object({
        file: z
            .object({
            path: z.string(),
        })
            .passthrough(),
    })
        .passthrough(),
})
    .passthrough();
export const BuildBaseInputDirectoryOrFileOutputFileModel = z
    .object({
    input: z
        .object({
        directory: z.optional(z
            .object({
            path: z.string(),
        })
            .passthrough()),
        file: z.optional(z
            .object({
            path: z.string(),
        })
            .passthrough()),
    })
        .passthrough(),
    output: z
        .object({
        file: z
            .object({
            path: z.string(),
        })
            .passthrough(),
    })
        .passthrough(),
})
    .passthrough();
export const BuildBaseInputFileOutputDirectoryModel = z
    .object({
    output: z
        .object({
        directory: z
            .object({
            path: z.string(),
        })
            .passthrough(),
    })
        .passthrough(),
    input: z
        .object({
        file: z
            .object({
            path: z.string(),
        })
            .passthrough(),
    })
        .passthrough(),
})
    .passthrough();
export const BuildCommandToOptimizeGifWithGifsicleModel = z.object({
    lossy: z.optional(z.number().int().gte(0)),
    background: z.optional(z.string()),
    left: z.optional(z.number().int()),
    right: z.optional(z.number().int()),
    top: z.optional(z.number().int()),
    bottom: z.optional(z.number().int()),
    flip: z.optional(z.lazy(() => FlipModel)),
    transparent: z.optional(z.string()),
    optimize: z.optional(z.lazy(() => GifsicleOptimizeOptionModel)),
    scale: z.optional(z.number()),
    output: z.object({
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const BuildFormatInputOutputModel = z
    .object({
    tool: z.optional(z.string()),
    input: z
        .object({
        format: z.string(),
    })
        .passthrough(),
    output: z
        .object({
        format: z.string(),
    })
        .passthrough(),
})
    .passthrough();
export const CalculateGematriaModel = z.object({
    input: z.object({
        string: z.object({
            decoded: z.string(),
            encoded: z.optional(z.string()),
        }),
    }),
});
export const CalibreInputFormatModel = z.enum(Cast.CALIBRE_INPUT_FORMAT);
export const CalibreInputProfileModel = z.enum(Cast.CALIBRE_INPUT_PROFILE);
export const CalibreOutputFormatModel = z.enum(Cast.CALIBRE_OUTPUT_FORMAT);
export const CalibreOutputProfileModel = z.enum(Cast.CALIBRE_OUTPUT_PROFILE);
export const CheckFileTypeUsingMagicBytesModel = z.object({
    input: z.object({
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const CipherKeyModel = z.enum(Cast.CIPHER_KEY);
export const ClangStyleAllModel = z.object({
    basedOnStyle: z.optional(z.string()),
    alignAfterOpenBracket: z.optional(z.enum(['align', 'dontAlign', 'alwaysBreak', 'blockIndent'])),
    alignArrayOfStructures: z.optional(z.enum(['left', 'right', 'none'])),
    alignConsecutiveAssignments: z.optional(z.object({
        enabled: z.boolean(),
        acrossEmptyLines: z.boolean(),
        acrossComments: z.boolean(),
        alignCompound: z.boolean(),
        alignFunctionPointers: z.boolean(),
        padOperators: z.boolean(),
    })),
    alignConsecutiveBitFields: z.optional(z.object({
        enabled: z.boolean(),
        acrossEmptyLines: z.boolean(),
        acrossComments: z.boolean(),
        alignCompound: z.boolean(),
        alignFunctionPointers: z.boolean(),
        padOperators: z.boolean(),
    })),
    alignConsecutiveDeclarations: z.optional(z.object({
        enabled: z.boolean(),
        acrossEmptyLines: z.boolean(),
        acrossComments: z.boolean(),
        alignCompound: z.boolean(),
        alignFunctionPointers: z.boolean(),
        padOperators: z.boolean(),
    })),
    alignConsecutiveMacros: z.optional(z.object({
        enabled: z.boolean(),
        acrossEmptyLines: z.boolean(),
        acrossComments: z.boolean(),
        alignCompound: z.boolean(),
        alignFunctionPointers: z.boolean(),
        padOperators: z.boolean(),
    })),
    alignConsecutiveShortCaseStatements: z.optional(z.object({
        enabled: z.boolean(),
        acrossEmptyLines: z.boolean(),
        acrossComments: z.boolean(),
        alignCaseColons: z.boolean(),
    })),
    alignEscapedNewlines: z.optional(z.enum(['dontAlign', 'left', 'right'])),
    alignOperands: z.optional(z.enum(['dontAlign', 'align', 'alignAfterOperator'])),
    alignTrailingComments: z.optional(z.object({
        kind: z.object({}),
        overEmptyLines: z.number().int(),
    })),
    allowAllArgumentsOnNextLine: z.optional(z.boolean()),
    allowAllConstructorInitializersOnNextLine: z.optional(z.boolean()),
    allowAllParametersOfDeclarationOnNextLine: z.optional(z.boolean()),
    allowBreakBeforeNoexceptSpecifier: z.optional(z.enum(['never', 'onlyWithParen', 'always'])),
    allowShortBlocksOnASingleLine: z.optional(z.enum(['never', 'empty', 'always'])),
    allowShortCaseLabelsOnASingleLine: z.optional(z.boolean()),
    allowShortCompoundRequirementOnASingleLine: z.optional(z.boolean()),
    allowShortEnumsOnASingleLine: z.optional(z.boolean()),
    allowShortFunctionsOnASingleLine: z.optional(z.enum(['none', 'inlineOnly', 'empty', 'inline', 'all'])),
    allowShortIfStatementsOnASingleLine: z.optional(z.enum(['never', 'withoutElse', 'onlyFirstIf', 'allIfsAndElse'])),
    allowShortLambdasOnASingleLine: z.optional(z.enum(['none', 'empty', 'inline', 'all'])),
    allowShortLoopsOnASingleLine: z.optional(z.boolean()),
    alwaysBreakAfterDefinitionReturnType: z.optional(z.enum(['none', 'all', 'topLevel'])),
    alwaysBreakAfterReturnType: z.optional(z.enum([
        'none',
        'all',
        'topLevel',
        'allDefinitions',
        'topLevelDefinitions',
    ])),
    alwaysBreakBeforeMultilineStrings: z.optional(z.boolean()),
    alwaysBreakTemplateDeclarations: z.optional(z.enum(['no', 'multiLine', 'yes'])),
    attributeMacros: z.optional(z.array(z.string())),
    binPackArguments: z.optional(z.boolean()),
    binPackParameters: z.optional(z.boolean()),
    bitFieldColonSpacing: z.optional(z.enum(['both', 'none', 'before', 'after'])),
    braceWrapping: z.optional(z.object({
        afterCaseLabel: z.boolean(),
        afterClass: z.boolean(),
        afterControlStatement: z.object({}),
        afterEnum: z.boolean(),
        afterFunction: z.boolean(),
        afterNamespace: z.boolean(),
        afterObjCDeclaration: z.boolean(),
        afterStruct: z.boolean(),
        afterUnion: z.boolean(),
        afterExternBlock: z.boolean(),
        beforeCatch: z.boolean(),
        beforeElse: z.boolean(),
        beforeLambdaBody: z.boolean(),
        beforeWhile: z.boolean(),
        indentBraces: z.boolean(),
        splitEmptyFunction: z.boolean(),
        splitEmptyRecord: z.boolean(),
        splitEmptyNamespace: z.boolean(),
    })),
    bracedInitializerIndentWidth: z.optional(z.number().int()),
    breakAdjacentStringLiterals: z.optional(z.boolean()),
    breakAfterAttributes: z.optional(z.enum(['always', 'leave', 'never'])),
    breakArrays: z.optional(z.boolean()),
    breakBeforeBinaryOperators: z.optional(z.enum(['none', 'nonAssignment', 'all'])),
    breakBeforeBraces: z.optional(z.enum([
        'attach',
        'linux',
        'mozilla',
        'stroustrup',
        'allman',
        'whitesmiths',
        'gnu',
        'webKit',
        'custom',
    ])),
    breakBeforeConceptDeclarations: z.optional(z.enum(['never', 'allowed', 'always'])),
    breakBeforeInlineAsmColon: z.optional(z.enum(['never', 'onlyMultiline', 'always'])),
    breakBeforeTernaryOperators: z.optional(z.boolean()),
    breakConstructorInitializers: z.optional(z.enum(['beforeColon', 'beforeComma', 'afterColon'])),
    breakInheritanceList: z.optional(z.enum([
        'beforeColon',
        'beforeComma',
        'afterColon',
        'afterComma',
    ])),
    breakStringLiterals: z.optional(z.boolean()),
    columnLimit: z.optional(z.number().int()),
    commentPragmas: z.optional(z.string()),
    compactNamespaces: z.optional(z.boolean()),
    constructorInitializerAllOnOneLineOrOnePerLine: z.optional(z.boolean()),
    constructorInitializerIndentWidth: z.optional(z.number().int()),
    continuationIndentWidth: z.optional(z.number().int()),
    deriveLineEnding: z.optional(z.boolean()),
    derivePointerAlignment: z.optional(z.boolean()),
    disableFormat: z.optional(z.boolean()),
    emptyLineAfterAccessModifier: z.optional(z.enum(['never', 'leave', 'always'])),
    emptyLineBeforeAccessModifier: z.optional(z.enum(['never', 'leave', 'logicalBlock', 'always'])),
    experimentalAutoDetectBinPacking: z.optional(z.boolean()),
    fixNamespaceComments: z.optional(z.boolean()),
    forEachMacros: z.optional(z.array(z.string())),
    ifMacros: z.optional(z.array(z.string())),
    includeBlocks: z.optional(z.enum(['preserve', 'merge', 'regroup'])),
    includeIsMainRegex: z.optional(z.string()),
    includeIsMainSourceRegex: z.optional(z.string()),
    indentAccessModifiers: z.optional(z.boolean()),
    indentCaseBlocks: z.optional(z.boolean()),
    indentCaseLabels: z.optional(z.boolean()),
    indentExternBlock: z.optional(z.enum(['afterExternBlock', 'noIndent', 'indent'])),
    indentGotoLabels: z.optional(z.boolean()),
    indentPpDirectives: z.optional(z.enum(['none', 'afterHash', 'beforeHash'])),
    indentRequiresClause: z.optional(z.boolean()),
    indentWidth: z.optional(z.number().int()),
    indentWrappedFunctionNames: z.optional(z.boolean()),
    insertBraces: z.optional(z.boolean()),
    insertNewlineAtEof: z.optional(z.boolean()),
    insertTrailingCommas: z.optional(z.enum(['none', 'wrapped'])),
    integerLiteralSeparator: z.optional(z.object({})),
    keepEmptyLinesAtEof: z.optional(z.boolean()),
    keepEmptyLinesAtTheStartOfBlocks: z.optional(z.boolean()),
    lambdaBodyIndentation: z.optional(z.enum(['signature', 'outerScope'])),
    language: z.optional(z.enum([
        'none',
        'cpp',
        'cSharp',
        'java',
        'javaScript',
        'json',
        'objC',
        'proto',
        'tableGen',
        'textProto',
        'verilog',
    ])),
    lineEnding: z.optional(z.enum(['lf', 'crlf', 'deriveLf', 'deriveCrlf'])),
    macroBlockBegin: z.optional(z.string()),
    macroBlockEnd: z.optional(z.string()),
    macros: z.optional(z.array(z.string())),
    maxEmptyLinesToKeep: z.optional(z.number().int()),
    namespaceIndentation: z.optional(z.enum(['none', 'inner', 'all'])),
    namespaceMacros: z.optional(z.array(z.string())),
    packConstructorInitializers: z.optional(z.enum([
        'never',
        'binPack',
        'currentLine',
        'nextLine',
        'nextLineOnly',
    ])),
    penaltyBreakAssignment: z.optional(z.number().int()),
    penaltyBreakBeforeFirstCallParameter: z.optional(z.number().int()),
    penaltyBreakComment: z.optional(z.number().int()),
    penaltyBreakFirstLessLess: z.optional(z.number().int()),
    penaltyBreakOpenParenthesis: z.optional(z.number().int()),
    penaltyBreakString: z.optional(z.number().int()),
    penaltyBreakTemplateDeclaration: z.optional(z.number().int()),
    penaltyExcessCharacter: z.optional(z.number().int()),
    penaltyIndentedWhitespace: z.optional(z.number().int()),
    penaltyReturnTypeOnItsOwnLine: z.optional(z.number().int()),
    pointerAlignment: z.optional(z.enum(['left', 'right', 'middle'])),
    qualifierAlignment: z.optional(z.enum(['leave', 'left', 'right', 'custom'])),
    qualifierOrder: z.optional(z.array(z.string())),
    referenceAlignment: z.optional(z.enum(['pointer', 'left', 'right', 'middle'])),
    reflowComments: z.optional(z.boolean()),
    removeBracesLlvm: z.optional(z.boolean()),
    removeParentheses: z.optional(z.enum(['leave', 'multipleParentheses', 'returnStatement'])),
    removeSemicolon: z.optional(z.boolean()),
    requiresClausePosition: z.optional(z.enum([
        'ownLine',
        'withPreceding',
        'withFollowing',
        'singleLine',
    ])),
    requiresExpressionIndentation: z.optional(z.enum(['outerScope', 'keyword'])),
    separateDefinitionBlocks: z.optional(z.enum(['leave', 'always', 'never'])),
    shortNamespaceLines: z.optional(z.number().int()),
    sortIncludes: z.optional(z.enum(['never', 'caseSensitive', 'caseInsensitive'])),
    sortUsingDeclarations: z.optional(z.enum(['never', 'lexicographic', 'lexicographicNumeric'])),
    spaceAfterCStyleCast: z.optional(z.boolean()),
    spaceAfterLogicalNot: z.optional(z.boolean()),
    spaceAfterTemplateKeyword: z.optional(z.boolean()),
    spaceAroundPointerQualifiers: z.optional(z.enum(['default', 'before', 'after', 'both'])),
    spaceBeforeAssignmentOperators: z.optional(z.boolean()),
    spaceBeforeCaseColon: z.optional(z.boolean()),
    spaceBeforeCtorInitializerColon: z.optional(z.boolean()),
    spaceBeforeInheritanceColon: z.optional(z.boolean()),
    spaceBeforeJsonColon: z.optional(z.boolean()),
    spaceBeforeParens: z.optional(z.enum([
        'never',
        'controlStatements',
        'controlStatementsExceptControlMacros',
        'nonEmptyParentheses',
        'always',
        'custom',
    ])),
    spaceBeforeParensOptions: z.optional(z.object({
        afterControlStatements: z.boolean(),
        afterForeachMacros: z.boolean(),
        afterFunctionDeclarationName: z.boolean(),
        afterFunctionDefinitionName: z.boolean(),
        afterIfMacros: z.boolean(),
        afterOverloadedOperator: z.boolean(),
        afterPlacementOperator: z.object({}),
        afterRequiresInClause: z.boolean(),
        afterRequiresInExpression: z.boolean(),
        beforeNonEmptyParentheses: z.boolean(),
    })),
    spaceBeforeRangeBasedForLoopColon: z.optional(z.boolean()),
    spaceBeforeSquareBrackets: z.optional(z.boolean()),
    spaceInEmptyBlock: z.optional(z.boolean()),
    spaceInEmptyParentheses: z.optional(z.boolean()),
    spacesBeforeTrailingComments: z.optional(z.number().int()),
    spacesInAngles: z.optional(z.enum(['never', 'always', 'leave'])),
    spacesInCStyleCastParentheses: z.optional(z.boolean()),
    spacesInConditionalStatement: z.optional(z.boolean()),
    spacesInContainerLiterals: z.optional(z.boolean()),
    spacesInLineCommentPrefix: z.optional(z.object({
        minimum: z.number().int(),
        maximum: z.number().int(),
    })),
    spacesInParens: z.optional(z.enum(['never', 'custom'])),
    spacesInParensOptions: z.optional(z.object({
        inConditionalStatements: z.boolean(),
        inCStyleCasts: z.boolean(),
        inEmptyParentheses: z.boolean(),
        other: z.boolean(),
    })),
    spacesInParentheses: z.optional(z.boolean()),
    spacesInSquareBrackets: z.optional(z.boolean()),
    standard: z.optional(z.enum([
        'lsCpp03',
        'lsCpp11',
        'lsCpp14',
        'lsCpp17',
        'lsCpp20',
        'latest',
        'auto',
    ])),
    statementAttributeLikeMacros: z.optional(z.array(z.string())),
    statementMacros: z.optional(z.array(z.string())),
    tabWidth: z.optional(z.number().int()),
    typeNames: z.optional(z.array(z.string())),
    typenameMacros: z.optional(z.array(z.string())),
    useCrlf: z.optional(z.boolean()),
    useTab: z.optional(z.enum([
        'never',
        'forIndentation',
        'forContinuationAndIndentation',
        'alignWithSpaces',
        'always',
    ])),
    verilogBreakBetweenInstancePorts: z.optional(z.boolean()),
    whitespaceSensitiveMacros: z.optional(z.array(z.string())),
});
export const ClangStyleCppModel = ClangStyleAllModel.extend({
    cpp11BracedListStyle: z.optional(z.boolean()),
    spaceBeforeCpp11BracedList: z.optional(z.boolean()),
});
export const ClangStyleJavaModel = ClangStyleAllModel.extend({
    breakAfterJavaFieldAnnotations: z.optional(z.boolean()),
    javaImportGroups: z.optional(z.array(z.string())),
    sortJavaStaticImport: z.optional(z.enum(['before', 'after'])),
});
export const ClangStyleJavascriptModel = ClangStyleAllModel.extend({
    javaScriptQuotes: z.optional(z.enum(['leave', 'single', 'double'])),
    javaScriptWrapImports: z.optional(z.boolean()),
});
export const ClangStyleObjcModel = ClangStyleAllModel.extend({
    objCBinPackProtocolList: z.optional(z.enum(['auto', 'always', 'never'])),
    objCBlockIndentWidth: z.optional(z.number().int()),
    objCBreakBeforeNestedBlockParam: z.optional(z.boolean()),
    objCPropertyAttributeOrder: z.optional(z.array(z.string())),
    objCSpaceAfterProperty: z.optional(z.boolean()),
    objCSpaceBeforeProtocolList: z.optional(z.boolean()),
});
export const CommandModel = z.object({
    name: z.lazy(() => CommandNameModel),
    key: z.lazy(() => CommandKeyModel),
    link: z.array(z.string()),
});
export const CommandKeyModel = z.enum(Cast.COMMAND_KEY);
export const CommandNameModel = z.enum(Cast.COMMAND_NAME);
export const CommandSequenceModel = z.object({
    call: z.array(z.lazy(() => CommandModel)),
});
export const CommandSequenceOutputModel = z.object({
    form: z.optional(z.string()).default('response'),
    code: z.optional(z.number().int().gte(0)).default(200),
    note: z.optional(z.string()).default('success'),
    tree: z.lazy(() => CommandSequenceModel),
});
export const CompileAsmModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const CompileCModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        format: z.lazy(() => BackendCompilationOutputModel),
        syntax: z.optional(z.lazy(() => AssemblySyntaxModel)),
        architecture: z.lazy(() => LlvmArchitectureModel),
        file: z.object({
            path: z.string(),
        }),
    }),
    optimizationLevel: z.optional(z.lazy(() => LlvmOptimizationLevelModel).default('0')),
    fastMath: z.optional(z.boolean()).default(false),
});
export const CompileCppModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        architecture: z.lazy(() => LlvmArchitectureModel),
        format: z.lazy(() => BackendCompilationOutputModel),
        syntax: z.optional(z.lazy(() => AssemblySyntaxModel)),
        file: z.object({
            path: z.string(),
        }),
    }),
    optimizationLevel: z.optional(z.lazy(() => LlvmOptimizationLevelModel).default('0')),
    fastMath: z.optional(z.boolean()).default(false),
});
export const CompileJavaModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const CompileLlvmModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const CompileLlvmIrToAssemblyModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        syntax: z.optional(z.lazy(() => AssemblySyntaxModel).default('intel')),
        architecture: z.optional(z.lazy(() => LlvmArchitectureModel).default('x86_64')),
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const CompileRustModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    explain: z.optional(z.boolean()).default(false),
    output: z.object({
        format: z.lazy(() => RustOutputFormatModel),
        optimize: z.optional(z.boolean()).default(false),
        target: z.optional(z.lazy(() => RustCompilerTargetModel)),
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const CompileSwiftModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        format: z.lazy(() => BackendCompilationOutputModel),
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const CompileToAstModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const CompileWastModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const CompressMp4WithFfmpegModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    audioCodec: z.optional(z.lazy(() => FfmpegCodecAudioModel).default('aac')),
    videoCodec: z.optional(z.lazy(() => FfmpegCodecVideoModel).default('h264')),
});
export const ConvertAiToSvgWithInkscapeBrowserInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.string(),
        file: z.instanceof(Blob),
    }),
    output: z.object({
        format: z.string(),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertAiToSvgWithInkscapeBrowserOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FileContentModel),
    }),
});
export const ConvertAiToSvgWithInkscapeNodeCommandInputModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.lazy(() => FileInputPathModel),
    }),
    output: z.object({
        format: z.string(),
        file: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertAiToSvgWithInkscapeNodeInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.string(),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.string(),
        file: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertAiToSvgWithInkscapeNodeOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FilePathModel),
    }),
});
export const ConvertAiToSvgWithInkscapeNodeOutputResponseModel = z.object({
    form: z.optional(z.string()).default('response'),
    code: z.optional(z.number().int().gte(0)).default(200),
    note: z.optional(z.string()).default('success'),
    tree: z.lazy(() => ConvertAiToSvgWithInkscapeNodeOutputModel),
});
export const ConvertAiToSvgWithInkscapeNodeRemoteInputModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.string(),
    }),
});
export const ConvertArchiveWithUnarchiverModel = z.object({
    temporary: z.object({
        directory: z.object({
            path: z.string(),
        }),
    }),
    input: z.object({
        format: z.lazy(() => UnarchiverFormatModel),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const ConvertDocumentWithCalibreBrowserInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.lazy(() => CalibreInputFormatModel),
        file: z.instanceof(Blob),
    }),
    output: z.object({
        format: z.lazy(() => CalibreOutputFormatModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertDocumentWithCalibreBrowserOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FileContentModel),
    }),
});
export const ConvertDocumentWithCalibreNodeCommandInputModel = z.object({
    input: z.object({
        format: z.lazy(() => CalibreInputFormatModel),
        file: z.lazy(() => FileInputPathModel),
    }),
    output: z.object({
        format: z.lazy(() => CalibreOutputFormatModel),
        file: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertDocumentWithCalibreNodeInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.lazy(() => CalibreInputFormatModel),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.lazy(() => CalibreOutputFormatModel),
        file: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertDocumentWithCalibreNodeOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FilePathModel),
    }),
});
export const ConvertDocumentWithCalibreNodeOutputResponseModel = z.object({
    form: z.optional(z.string()).default('response'),
    code: z.optional(z.number().int().gte(0)).default(200),
    note: z.optional(z.string()).default('success'),
    tree: z.lazy(() => ConvertDocumentWithCalibreNodeOutputModel),
});
export const ConvertDocumentWithCalibreNodeRemoteInputModel = z.object({
    input: z.object({
        format: z.lazy(() => CalibreInputFormatModel),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.lazy(() => CalibreOutputFormatModel),
    }),
});
export const ConvertDocumentWithJupyterBrowserInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.string(),
        file: z.instanceof(Blob),
    }),
    output: z.object({
        format: z.string(),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertDocumentWithJupyterBrowserOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FileContentModel),
    }),
});
export const ConvertDocumentWithJupyterNodeCommandInputModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.lazy(() => FileInputPathModel),
    }),
    output: z.object({
        format: z.string(),
        file: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertDocumentWithJupyterNodeInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.string(),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.string(),
        file: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertDocumentWithJupyterNodeOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FilePathModel),
    }),
});
export const ConvertDocumentWithJupyterNodeOutputResponseModel = z.object({
    form: z.optional(z.string()).default('response'),
    code: z.optional(z.number().int().gte(0)).default(200),
    note: z.optional(z.string()).default('success'),
    tree: z.lazy(() => ConvertDocumentWithJupyterNodeOutputModel),
});
export const ConvertDocumentWithJupyterNodeRemoteInputModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.string(),
    }),
});
export const ConvertDocumentWithLibreOfficeBrowserInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.lazy(() => LibreOfficeInputFormatModel),
        file: z.lazy(() => FileContentModel),
    }),
    output: z.object({
        format: z.lazy(() => LibreOfficeOutputFormatModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertDocumentWithLibreOfficeBrowserOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FileContentModel),
    }),
});
export const ConvertDocumentWithLibreOfficeNodeCommandInputModel = z.object({
    input: z.object({
        format: z.lazy(() => LibreOfficeInputFormatModel),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        format: z.lazy(() => LibreOfficeOutputFormatModel),
        directory: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertDocumentWithLibreOfficeNodeInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.lazy(() => LibreOfficeInputFormatModel),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.lazy(() => LibreOfficeOutputFormatModel),
        directory: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertDocumentWithLibreOfficeNodeOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FilePathModel),
    }),
});
export const ConvertDocumentWithLibreOfficeNodeOutputResponseModel = z.object({
    form: z.optional(z.string()).default('response'),
    code: z.optional(z.number().int().gte(0)).default(200),
    note: z.optional(z.string()).default('success'),
    tree: z.lazy(() => ConvertDocumentWithLibreOfficeNodeOutputModel),
});
export const ConvertDocumentWithLibreOfficeNodeRemoteInputModel = z.object({
    input: z.object({
        format: z.lazy(() => LibreOfficeInputFormatModel),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.lazy(() => LibreOfficeOutputFormatModel),
    }),
});
export const ConvertDocumentWithPandocBrowserInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.lazy(() => PandocInputFormatModel),
        file: z.instanceof(Blob),
    }),
    output: z.object({
        format: z.lazy(() => PandocOutputFormatModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertDocumentWithPandocBrowserOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FileContentModel),
    }),
});
export const ConvertDocumentWithPandocNodeCommandInputModel = z.object({
    input: z.object({
        format: z.lazy(() => PandocInputFormatModel),
        file: z.lazy(() => FileInputPathModel),
    }),
    output: z.object({
        format: z.lazy(() => PandocOutputFormatModel),
        file: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertDocumentWithPandocNodeInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.lazy(() => PandocInputFormatModel),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.lazy(() => PandocOutputFormatModel),
        file: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertDocumentWithPandocNodeOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FilePathModel),
    }),
});
export const ConvertDocumentWithPandocNodeOutputResponseModel = z.object({
    form: z.optional(z.string()).default('response'),
    code: z.optional(z.number().int().gte(0)).default(200),
    note: z.optional(z.string()).default('success'),
    tree: z.lazy(() => ConvertDocumentWithPandocNodeOutputModel),
});
export const ConvertDocumentWithPandocNodeRemoteInputModel = z.object({
    input: z.object({
        format: z.lazy(() => PandocInputFormatModel),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.lazy(() => PandocOutputFormatModel),
    }),
});
export const ConvertDocumentWithPuppeteerBrowserInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.lazy(() => PuppeteerInputFormatModel),
        file: z.instanceof(Blob),
    }),
    output: z.object({
        format: z.lazy(() => PuppeteerOutputFormatModel),
    }),
    pathScope: z.optional(z.string()),
    viewport: z.object({
        width: z.optional(z.number().int().gte(0)),
        height: z.optional(z.number().int().gte(0)),
    }),
    proxy: z.optional(z.string()),
    waitUntil: z.optional(z.lazy(() => PuppeteerLifeCycleEventModel)),
});
export const ConvertDocumentWithPuppeteerBrowserOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FileContentModel),
    }),
});
export const ConvertDocumentWithPuppeteerNodeCommandInputModel = z.object({
    input: z.object({
        format: z.lazy(() => PuppeteerInputFormatModel),
        file: z.lazy(() => FileInputPathModel),
    }),
    output: z.object({
        format: z.lazy(() => PuppeteerOutputFormatModel),
        file: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
    viewport: z.object({
        width: z.optional(z.number().int().gte(0)),
        height: z.optional(z.number().int().gte(0)),
    }),
    proxy: z.optional(z.string()),
    waitUntil: z.optional(z.lazy(() => PuppeteerLifeCycleEventModel)),
});
export const ConvertDocumentWithPuppeteerNodeInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.lazy(() => PuppeteerInputFormatModel),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.lazy(() => PuppeteerOutputFormatModel),
        file: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
    viewport: z.object({
        width: z.optional(z.number().int().gte(0)),
        height: z.optional(z.number().int().gte(0)),
    }),
    proxy: z.optional(z.string()),
    waitUntil: z.optional(z.lazy(() => PuppeteerLifeCycleEventModel)),
});
export const ConvertDocumentWithPuppeteerNodeOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FilePathModel),
    }),
});
export const ConvertDocumentWithPuppeteerNodeOutputResponseModel = z.object({
    form: z.optional(z.string()).default('response'),
    code: z.optional(z.number().int().gte(0)).default(200),
    note: z.optional(z.string()).default('success'),
    tree: z.lazy(() => ConvertDocumentWithPuppeteerNodeOutputModel),
});
export const ConvertDocumentWithPuppeteerNodeRemoteInputModel = z.object({
    input: z.object({
        format: z.lazy(() => PuppeteerInputFormatModel),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.lazy(() => PuppeteerOutputFormatModel),
    }),
    viewport: z.object({
        width: z.optional(z.number().int().gte(0)),
        height: z.optional(z.number().int().gte(0)),
    }),
    proxy: z.optional(z.string()),
    waitUntil: z.optional(z.lazy(() => PuppeteerLifeCycleEventModel)),
});
export const ConvertFileBaseModel = z
    .object({
    tool: z.optional(z.string()),
    remote: z.optional(z.boolean()),
    async: z.optional(z.boolean()).default(false),
    input: z
        .object({
        format: z.string(),
        file: z.union([
            z.lazy(() => FileContentModel),
            z.lazy(() => FilePathModel),
        ]),
    })
        .passthrough(),
    output: z
        .object({
        format: z.string(),
        file: z
            .object({
            path: z.string(),
        })
            .passthrough(),
    })
        .passthrough(),
})
    .passthrough();
export const ConvertFileBaseRemoteModel = z
    .object({
    tool: z.optional(z.string()),
    remote: z.optional(z.boolean()),
    async: z.optional(z.boolean()).default(false),
    input: z
        .object({
        format: z.string(),
        file: z.union([
            z.lazy(() => FileContentModel),
            z.lazy(() => FilePathModel),
        ]),
    })
        .passthrough(),
    output: z
        .object({
        format: z.string(),
    })
        .passthrough(),
})
    .passthrough();
export const ConvertFontWithFontForgeBrowserInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.lazy(() => FontFormatModel),
        file: z.instanceof(Blob),
    }),
    output: z.object({
        format: z.lazy(() => FontFormatModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertFontWithFontForgeBrowserOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FileContentModel),
    }),
});
export const ConvertFontWithFontForgeNodeCommandInputModel = z.object({
    input: z.object({
        format: z.lazy(() => FontFormatModel),
        file: z.lazy(() => FileInputPathModel),
    }),
    output: z.object({
        format: z.lazy(() => FontFormatModel),
        file: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertFontWithFontForgeNodeInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.lazy(() => FontFormatModel),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.lazy(() => FontFormatModel),
        file: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertFontWithFontForgeNodeOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FilePathModel),
    }),
});
export const ConvertFontWithFontForgeNodeOutputResponseModel = z.object({
    form: z.optional(z.string()).default('response'),
    code: z.optional(z.number().int().gte(0)).default(200),
    note: z.optional(z.string()).default('success'),
    tree: z.lazy(() => ConvertFontWithFontForgeNodeOutputModel),
});
export const ConvertFontWithFontForgeNodeRemoteInputModel = z.object({
    input: z.object({
        format: z.lazy(() => FontFormatModel),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.lazy(() => FontFormatModel),
    }),
});
export const ConvertImageWithImageMagickBrowserInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.lazy(() => ImageMagickInputFormatModel),
        file: z.instanceof(Blob),
    }),
    output: z.object({
        format: z.lazy(() => ImageMagickOutputFormatModel),
    }),
    pathScope: z.optional(z.string()),
    colorCount: z.optional(z.number().int().gte(0)),
    colorMatrix: z.optional(z
        .lazy(() => ImageMagicColorMatrixModel)
        .refine(TEST('colorMatrix', code.test_image_magic_color_matrix.test))),
    colorSpace: z.optional(z.lazy(() => ImageMagickColorSpaceModel)),
    compare: z.optional(z.boolean()),
    compression: z.optional(z.lazy(() => ImageMagickCompressionModel)),
    density: z.optional(z.number().int().gte(0)),
    quality: z.optional(z.number().int().gte(0)),
});
export const ConvertImageWithImageMagickBrowserOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FileContentModel),
    }),
});
export const ConvertImageWithImageMagickNodeCommandInputModel = z.object({
    input: z.object({
        format: z.lazy(() => ImageMagickInputFormatModel),
        file: z.lazy(() => FileInputPathModel),
    }),
    output: z.object({
        format: z.lazy(() => ImageMagickOutputFormatModel),
        file: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
    colorCount: z.optional(z.number().int().gte(0)),
    colorMatrix: z.optional(z
        .lazy(() => ImageMagicColorMatrixModel)
        .refine(TEST('colorMatrix', code.test_image_magic_color_matrix.test))),
    colorSpace: z.optional(z.lazy(() => ImageMagickColorSpaceModel)),
    compare: z.optional(z.boolean()),
    compression: z.optional(z.lazy(() => ImageMagickCompressionModel)),
    density: z.optional(z.number().int().gte(0)),
    quality: z.optional(z.number().int().gte(0)),
});
export const ConvertImageWithImageMagickNodeInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.lazy(() => ImageMagickInputFormatModel),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.lazy(() => ImageMagickOutputFormatModel),
        file: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
    colorCount: z.optional(z.number().int().gte(0)),
    colorMatrix: z.optional(z
        .lazy(() => ImageMagicColorMatrixModel)
        .refine(TEST('colorMatrix', code.test_image_magic_color_matrix.test))),
    colorSpace: z.optional(z.lazy(() => ImageMagickColorSpaceModel)),
    compare: z.optional(z.boolean()),
    compression: z.optional(z.lazy(() => ImageMagickCompressionModel)),
    density: z.optional(z.number().int().gte(0)),
    quality: z.optional(z.number().int().gte(0)),
});
export const ConvertImageWithImageMagickNodeOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FilePathModel),
    }),
});
export const ConvertImageWithImageMagickNodeOutputResponseModel = z.object({
    form: z.optional(z.string()).default('response'),
    code: z.optional(z.number().int().gte(0)).default(200),
    note: z.optional(z.string()).default('success'),
    tree: z.lazy(() => ConvertImageWithImageMagickNodeOutputModel),
});
export const ConvertImageWithImageMagickNodeRemoteInputModel = z.object({
    input: z.object({
        format: z.lazy(() => ImageMagickInputFormatModel),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.lazy(() => ImageMagickOutputFormatModel),
    }),
    colorCount: z.optional(z.number().int().gte(0)),
    colorMatrix: z.optional(z
        .lazy(() => ImageMagicColorMatrixModel)
        .refine(TEST('colorMatrix', code.test_image_magic_color_matrix.test))),
    colorSpace: z.optional(z.lazy(() => ImageMagickColorSpaceModel)),
    compare: z.optional(z.boolean()),
    compression: z.optional(z.lazy(() => ImageMagickCompressionModel)),
    density: z.optional(z.number().int().gte(0)),
    quality: z.optional(z.number().int().gte(0)),
});
export const ConvertLatexToPngBrowserInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.lazy(() => ConvertLatexToPngInputFormatModel),
        file: z.instanceof(Blob),
    }),
    output: z.object({
        format: z.lazy(() => ConvertLatexToPngOutputFormatModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertLatexToPngBrowserOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FileContentModel),
    }),
});
export const ConvertLatexToPngInputFormatModel = z.enum(Cast.CONVERT_LATEX_TO_PNG_INPUT_FORMAT);
export const ConvertLatexToPngNodeInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.lazy(() => ConvertLatexToPngInputFormatModel),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.lazy(() => ConvertLatexToPngOutputFormatModel),
        file: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertLatexToPngNodeOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FilePathModel),
    }),
});
export const ConvertLatexToPngNodeOutputResponseModel = z.object({
    form: z.optional(z.string()).default('response'),
    code: z.optional(z.number().int().gte(0)).default(200),
    note: z.optional(z.string()).default('success'),
    tree: z.lazy(() => ConvertLatexToPngNodeOutputModel),
});
export const ConvertLatexToPngNodeRemoteInputModel = z.object({
    input: z.object({
        format: z.lazy(() => ConvertLatexToPngInputFormatModel),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.lazy(() => ConvertLatexToPngOutputFormatModel),
    }),
});
export const ConvertLatexToPngOutputFormatModel = z.enum(Cast.CONVERT_LATEX_TO_PNG_OUTPUT_FORMAT);
export const ConvertLatexWithPdfLatexBrowserInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.lazy(() => PdfLatexInputFormatModel),
        file: z.lazy(() => FileContentModel),
    }),
    output: z.object({
        format: z.lazy(() => PdfLatexOutputFormatModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertLatexWithPdfLatexBrowserOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FileContentModel),
    }),
});
export const ConvertLatexWithPdfLatexNodeCommandInputModel = z.object({
    input: z.object({
        format: z.lazy(() => PdfLatexInputFormatModel),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        format: z.lazy(() => PdfLatexOutputFormatModel),
        directory: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertLatexWithPdfLatexNodeInputModel = z.object({
    remote: z.optional(z.boolean()),
    input: z.object({
        format: z.lazy(() => PdfLatexInputFormatModel),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.lazy(() => PdfLatexOutputFormatModel),
        directory: z.lazy(() => FileOutputPathModel),
    }),
    pathScope: z.optional(z.string()),
});
export const ConvertLatexWithPdfLatexNodeOutputModel = z.object({
    output: z.object({
        file: z.lazy(() => FilePathModel),
    }),
});
export const ConvertLatexWithPdfLatexNodeOutputResponseModel = z.object({
    form: z.optional(z.string()).default('response'),
    code: z.optional(z.number().int().gte(0)).default(200),
    note: z.optional(z.string()).default('success'),
    tree: z.lazy(() => ConvertLatexWithPdfLatexNodeOutputModel),
});
export const ConvertLatexWithPdfLatexNodeRemoteInputModel = z.object({
    input: z.object({
        format: z.lazy(() => PdfLatexInputFormatModel),
        file: z.union([
            z.lazy(() => FileInputPathModel),
            z.lazy(() => FileContentModel),
        ]),
    }),
    output: z.object({
        format: z.lazy(() => PdfLatexOutputFormatModel),
    }),
});
export const ConvertMp4ToGifWithFfmpegModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    fps: z.number().int(),
    width: z.number().int(),
    startTime: z.union([
        z
            .number()
            .int()
            .refine(TEST('startTime', code.test_time_integer.test)),
        z.string().refine(TEST('startTime', code.test_time_string.test)),
    ]),
    endTime: z.union([
        z
            .number()
            .int()
            .refine(TEST('endTime', code.test_time_integer.test)),
        z.string().refine(TEST('endTime', code.test_time_string.test)),
    ]),
    duration: z.union([
        z
            .number()
            .int()
            .refine(TEST('duration', code.test_time_integer.test)),
        z.string().refine(TEST('duration', code.test_time_string.test)),
    ]),
});
export const ConvertTimeZoneModel = z.object({
    input: z.object({
        date: z.string(),
    }),
    output: z.object({
        timezone: z.lazy(() => TimeZoneModel),
        format: z.string(),
    }),
});
export const ConvertVideoToAudioWithFfmpegModel = z.object({
    inputPath: z.string(),
    outputPath: z.string(),
});
export const ConvertVideoWithFfmpegModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    audioCodec: z.optional(z.lazy(() => FfmpegCodecAudioModel)),
    videoCodec: z.optional(z.lazy(() => FfmpegCodecVideoModel)),
    audioBitRate: z.optional(z.number().int()),
    videoBitRate: z.optional(z.number().int()),
    frameRate: z.optional(z.number().int()),
    startTime: z.optional(z.union([
        z
            .number()
            .int()
            .refine(TEST('startTime', code.test_time_integer.test)),
        z
            .string()
            .refine(TEST('startTime', code.test_time_string.test)),
    ])),
    endTime: z.optional(z.union([
        z
            .number()
            .int()
            .refine(TEST('endTime', code.test_time_integer.test)),
        z.string().refine(TEST('endTime', code.test_time_string.test)),
    ])),
    strict: z.optional(z.lazy(() => FfmpegStrictOptionModel).default('strict')),
    overwrite: z.optional(z.boolean()).default(false),
    progress: z.optional(z.boolean()).default(false),
    scaleWidth: z.optional(z.number().int()),
    scaleHeight: z.optional(z.number().int()),
    audioChannels: z.optional(z.number().int()),
    audioSamplingFrequency: z.optional(z.number().int()),
    subtitleCodec: z.optional(z.lazy(() => FfmpegCodecSubtitleModel)),
    duration: z.optional(z.union([
        z
            .number()
            .int()
            .refine(TEST('duration', code.test_time_integer.test)),
        z.string().refine(TEST('duration', code.test_time_string.test)),
    ])),
    rotation: z.optional(z.number()),
});
export const ConvertVideoWithFfmpegBaseModel = z.object({
    audioCodec: z.optional(z.lazy(() => FfmpegCodecAudioModel)),
    videoCodec: z.optional(z.lazy(() => FfmpegCodecVideoModel)),
    audioBitRate: z.optional(z.number().int()),
    videoBitRate: z.optional(z.number().int()),
    frameRate: z.optional(z.number().int()),
    startTime: z.optional(z.union([
        z
            .number()
            .int()
            .refine(TEST('startTime', code.test_time_integer.test)),
        z
            .string()
            .refine(TEST('startTime', code.test_time_string.test)),
    ])),
    endTime: z.optional(z.union([
        z
            .number()
            .int()
            .refine(TEST('endTime', code.test_time_integer.test)),
        z.string().refine(TEST('endTime', code.test_time_string.test)),
    ])),
    strict: z.optional(z.lazy(() => FfmpegStrictOptionModel).default('strict')),
    overwrite: z.optional(z.boolean()).default(false),
    progress: z.optional(z.boolean()).default(false),
    scaleWidth: z.optional(z.number().int()),
    scaleHeight: z.optional(z.number().int()),
    audioChannels: z.optional(z.number().int()),
    audioSamplingFrequency: z.optional(z.number().int()),
    subtitleCodec: z.optional(z.lazy(() => FfmpegCodecSubtitleModel)),
    duration: z.optional(z.union([
        z
            .number()
            .int()
            .refine(TEST('duration', code.test_time_integer.test)),
        z.string().refine(TEST('duration', code.test_time_string.test)),
    ])),
    rotation: z.optional(z.number()),
});
export const CropPdfWithPdfCropModel = z.object({
    margin: z.optional(z.number().int().gte(0)),
    input: z.object({
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const DecompressWith7ZModel = z.object({
    input: z.object({
        format: z.string(),
        path: z.string(),
    }),
    output: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const DecompressWithUnarchiverModel = z.object({
    output: z.object({
        overwrite: z.optional(z.boolean()).default(false),
        directory: z.object({
            path: z.string(),
        }),
    }),
    input: z.object({
        password: z.optional(z.string()),
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const DisassembleBinaryWithObjdumpModel = z.object({
    show: z.array(z.lazy(() => ObjdumpShowOptionModel)),
    demangleStyle: z.lazy(() => ObjdumpDemangleStyleModel),
    disassembleAll: z.boolean(),
    hide: z.lazy(() => ObjdumpHideOptionModel),
    color: z.boolean(),
});
export const ExiftoolFamilyContentKeyModel = z.enum(Cast.EXIFTOOL_FAMILY_CONTENT_KEY);
export const ExiftoolImageFormatContentKeyModel = z.enum(Cast.EXIFTOOL_IMAGE_FORMAT_CONTENT_KEY);
export const ExiftoolTagContentKeyModel = z.enum(Cast.EXIFTOOL_TAG_CONTENT_KEY);
export const ExplainFormatModel = z.enum(Cast.EXPLAIN_FORMAT);
export const FfmpegCodecAudioModel = z.enum(Cast.FFMPEG_CODEC_AUDIO);
export const FfmpegCodecContentKeyModel = z.enum(Cast.FFMPEG_CODEC_CONTENT_KEY);
export const FfmpegCodecSubtitleModel = z.enum(Cast.FFMPEG_CODEC_SUBTITLE);
export const FfmpegCodecVideoModel = z.enum(Cast.FFMPEG_CODEC_VIDEO);
export const FfmpegDecoderAudioModel = z.enum(Cast.FFMPEG_DECODER_AUDIO);
export const FfmpegDecoderContentKeyModel = z.enum(Cast.FFMPEG_DECODER_CONTENT_KEY);
export const FfmpegDecoderSubtitleModel = z.enum(Cast.FFMPEG_DECODER_SUBTITLE);
export const FfmpegDecoderVideoModel = z.enum(Cast.FFMPEG_DECODER_VIDEO);
export const FfmpegEncoderAudioModel = z.enum(Cast.FFMPEG_ENCODER_AUDIO);
export const FfmpegEncoderContentKeyModel = z.enum(Cast.FFMPEG_ENCODER_CONTENT_KEY);
export const FfmpegEncoderSubtitleModel = z.enum(Cast.FFMPEG_ENCODER_SUBTITLE);
export const FfmpegEncoderVideoModel = z.enum(Cast.FFMPEG_ENCODER_VIDEO);
export const FfmpegFormatModel = z.enum(Cast.FFMPEG_FORMAT);
export const FfmpegFormatContentKeyModel = z.enum(Cast.FFMPEG_FORMAT_CONTENT_KEY);
export const FfmpegStrictOptionModel = z.enum(Cast.FFMPEG_STRICT_OPTION);
export const FileContentModel = z.object({
    content: z.union([z.instanceof(ArrayBuffer), z.string()]),
});
export const FileHasOutputContentModel = z.object({
    content: z.boolean(),
});
export const FileInputPathModel = z.object({
    path: z.string(),
});
export const FileOutputPathModel = z.object({
    path: z.string(),
});
export const FilePathModel = z.object({
    path: z.string(),
});
export const FlipModel = z.enum(Cast.FLIP);
export const FontFormatModel = z.enum(Cast.FONT_FORMAT);
export const FormatAssemblyModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const FormatCModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const FormatCodeFormatModel = z.enum(Cast.FORMAT_CODE_FORMAT);
export const FormatCodeWithClangFormatModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        file: z.object({
            path: z.string(),
        }),
    }),
    style: z.optional(z.lazy(() => ClangStyleAllModel)),
});
export const FormatCodeWithPrettierModel = z.object({
    code: z.string(),
    format: z.lazy(() => PrettierPluginModel),
});
export const FormatCppModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const FormatJavaModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const FormatJavaWithPrettierModel = z.object({
    code: z.string(),
    max_line_length: z.optional(z.number().int().gte(0)),
    indentation_size: z.optional(z.number().int().gte(0)),
    use_tabs: z.optional(z.boolean()),
    trailing_comma: z.optional(z.boolean()),
});
export const FormatKotlinModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const FormatPythonModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const FormatRubyModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const FormatRustModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const FormatRustWithPrettierModel = z.object({
    code: z.string(),
    use_tabs: z.optional(z.boolean()),
    tab_width: z.optional(z.number().int().gte(0)),
    max_line_length: z.optional(z.number().int().gte(0)),
    end_of_line: z.optional(z.string()),
});
export const FormatShWithPrettierModel = z.object({
    code: z.string(),
    keep_comments: z.optional(z.boolean()),
    stop_at: z.optional(z.string()),
    variant: z.optional(z.string()),
    indent: z.optional(z.number().int().gte(0)),
    binary_next_line: z.optional(z.boolean()),
    switch_case_indent: z.optional(z.boolean()),
    space_redirects: z.optional(z.boolean()),
    keep_padding: z.optional(z.boolean()),
    minify: z.optional(z.boolean()),
    function_next_line: z.optional(z.boolean()),
});
export const FormatSqlWithContentModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            content: z.union([z.instanceof(ArrayBuffer), z.string()]),
        }),
    }),
});
export const FormatSwiftModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    output: z.object({
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const FormatTypescriptWithPrettierModel = z.object({
    code: z.string(),
    jsx_single_quote: z.boolean(),
    single_quote: z.boolean(),
    semi_colon: z.boolean(),
    indentation_size: z.number().int().gte(0),
    max_line_length: z.number().int().gte(0),
    trailing_comma: z.boolean(),
    bracket_spacing: z.boolean(),
    bracket_same_line: z.boolean(),
    arrow_parentheses: z.boolean(),
    end_of_line: z.string(),
    single_attribute_per_line: z.boolean(),
});
export const GematriaSystemCalculationModel = z.object({
    system: z.object({
        slug: z.string(),
        title: z.string(),
    }),
    reduction: z.number().int().gte(0),
    summation: z.number().int().gte(0),
});
export const GematriaSystemCalculationResultModel = z.object({
    string: z.object({
        decoded: z.string(),
        encoded: z.string(),
    }),
    script: z.object({
        slug: z.string(),
        title: z.string(),
    }),
    calculation: z.array(z.lazy(() => GematriaSystemCalculationModel)),
});
export const GenerateMurmurHashModel = z.object({
    input: z.string(),
    seed: z.number().int(),
    version: z.optional(z.string()).default('3'),
});
export const GenerateQrCodeModel = z.object({
    errorCorrectionLevel: z.lazy(() => QrCodeErrorCorrectionLevelModel),
    format: z.lazy(() => QrCodeFormatModel),
    margin: z.number().int().gte(0),
    color: z.optional(z.object({
        dark: z
            .string()
            .refine(TEST('dark', code.test_hex_color_8.test)),
        light: z
            .string()
            .refine(TEST('light', code.test_hex_color_8.test)),
    })),
});
export const GifsicleOptimizeOptionModel = z.enum(Cast.GIFSICLE_OPTIMIZE_OPTION);
export const ImageMagicColorMatrixModel = z.object({
    row: z.number().int().gte(0),
    column: z.number().int().gte(0),
    value: z.array(z.number()),
});
export const ImageMagickChannelModel = z.enum(Cast.IMAGE_MAGICK_CHANNEL);
export const ImageMagickColorSpaceModel = z.enum(Cast.IMAGE_MAGICK_COLOR_SPACE);
export const ImageMagickCompressionModel = z.enum(Cast.IMAGE_MAGICK_COMPRESSION);
export const ImageMagickFormatModel = z.enum(Cast.IMAGE_MAGICK_FORMAT);
export const ImageMagickGravityModel = z.enum(Cast.IMAGE_MAGICK_GRAVITY);
export const ImageMagickInputFormatModel = z.enum(Cast.IMAGE_MAGICK_INPUT_FORMAT);
export const ImageMagickOutputFormatModel = z.enum(Cast.IMAGE_MAGICK_OUTPUT_FORMAT);
export const InkscapeExportFormatModel = z.enum(Cast.INKSCAPE_EXPORT_FORMAT);
export const InkscapeImportFormatModel = z.enum(Cast.INKSCAPE_IMPORT_FORMAT);
export const InspectColorModel = z.object({
    value: z.string(),
});
export const InspectMetadataFromImageModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    copyright: z.optional(z.string()),
    creator: z.optional(z.string()),
    license: z.optional(z.string()),
    keywords: z.optional(z.array(z.string())),
    artist: z.optional(z.string()),
    originalDate: z.optional(z.coerce.date()),
    allDates: z.optional(z.coerce.date()),
    creationDate: z.optional(z.coerce.date()),
    title: z.optional(z.string()),
    description: z.optional(z.string()),
});
export const LibreOfficeInputFormatModel = z.enum(Cast.LIBRE_OFFICE_INPUT_FORMAT);
export const LibreOfficeOutputFormatModel = z.enum(Cast.LIBRE_OFFICE_OUTPUT_FORMAT);
export const LlvmArchitectureModel = z.enum(Cast.LLVM_ARCHITECTURE);
export const LlvmCpuModel = z.enum(Cast.LLVM_CPU);
export const LlvmFeatureModel = z.enum(Cast.LLVM_FEATURE);
export const LlvmOptimizationLevelModel = z.enum(Cast.LLVM_OPTIMIZATION_LEVEL);
export const ObjdumpDemangleStyleModel = z.enum(Cast.OBJDUMP_DEMANGLE_STYLE);
export const ObjdumpHideOptionModel = z.enum(Cast.OBJDUMP_HIDE_OPTION);
export const ObjdumpShowOptionModel = z.enum(Cast.OBJDUMP_SHOW_OPTION);
export const PandocFormatContentKeyModel = z.enum(Cast.PANDOC_FORMAT_CONTENT_KEY);
export const PandocInputFormatModel = z.enum(Cast.PANDOC_INPUT_FORMAT);
export const PandocOutputFormatModel = z.enum(Cast.PANDOC_OUTPUT_FORMAT);
export const PatoolFormatModel = z.enum(Cast.PATOOL_FORMAT);
export const PdfLatexInputFormatModel = z.enum(Cast.PDF_LATEX_INPUT_FORMAT);
export const PdfLatexOutputFormatModel = z.enum(Cast.PDF_LATEX_OUTPUT_FORMAT);
export const PrettierPluginModel = z.enum(Cast.PRETTIER_PLUGIN);
export const PuppeteerInputFormatModel = z.enum(Cast.PUPPETEER_INPUT_FORMAT);
export const PuppeteerLifeCycleEventModel = z.enum(Cast.PUPPETEER_LIFE_CYCLE_EVENT);
export const PuppeteerOutputFormatModel = z.enum(Cast.PUPPETEER_OUTPUT_FORMAT);
export const QrCodeErrorCorrectionLevelModel = z.enum(Cast.QR_CODE_ERROR_CORRECTION_LEVEL);
export const QrCodeFormatModel = z.enum(Cast.QR_CODE_FORMAT);
export const RemoveAudioFromVideoWithFfmpegModel = z.object({
    inputPath: z.string(),
    outputPath: z.string(),
});
export const RemoveImageMetadataModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const ReplaceImageColorWithImageMagickModel = z.object({
    inputPath: z.string(),
    outputPath: z.string(),
    startColor: z.string(),
    endColor: z.string(),
    fuzz: z.number(),
});
export const RequestModel = z.object({
    path: z.string(),
    body: z.object({}).passthrough(),
});
export const RequestOutputModel = z.object({
    form: z.optional(z.string()).default('response'),
    code: z.optional(z.number().int().gte(0)).default(200),
    note: z.optional(z.string()).default('success'),
    tree: z.lazy(() => RequestModel),
});
export const ResizeImageWithImageMagickModel = z.object({
    inputPath: z.string(),
    outputPath: z.string(),
    width: z.number().int(),
    height: z.number().int(),
    stretch: z.boolean(),
    gravity: z.lazy(() => ImageMagickGravityModel),
});
export const ResponseModel = z.object({
    form: z.optional(z.string()).default('response'),
    code: z.optional(z.number().int().gte(0)).default(200),
    note: z.optional(z.string()).default('success'),
    tree: z.object({}).passthrough(),
});
export const RustCompilerTargetModel = z.enum(Cast.RUST_COMPILER_TARGET);
export const RustOutputFormatModel = z.enum(Cast.RUST_OUTPUT_FORMAT);
export const SanitizeHtmlFromContentModel = z.object({
    input: z.object({
        format: z.string(),
        content: z.string(),
    }),
});
export const SharedGematriaLanguageModel = z.enum(Cast.SHARED_GEMATRIA_LANGUAGE);
export const SlicePdfModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    startPage: z.number().int().gte(0),
    endPage: z.number().int().gte(0),
    output: z.object({
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const SlicePdfWithDataModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            data: z.instanceof(ArrayBuffer),
        }),
    }),
    startPage: z.number().int().gte(0),
    endPage: z.number().int().gte(0),
});
export const TaskModel = z.enum(Cast.TASK);
export const TimeZoneModel = z.enum(Cast.TIME_ZONE);
export const TimeZoneAbbreviationModel = z.enum(Cast.TIME_ZONE_ABBREVIATION);
export const TimeZoneLocationModel = z.enum(Cast.TIME_ZONE_LOCATION);
export const UnarchiverFormatModel = z.enum(Cast.UNARCHIVER_FORMAT);
export const ValidatePdfWithDataModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            data: z.instanceof(ArrayBuffer),
        }),
    }),
});
export const VerifyImageWithImageMagickModel = z.object({
    input: z.object({
        format: z.lazy(() => ImageMagickFormatModel),
        file: z.object({
            path: z.string(),
        }),
    }),
});
export const WriteMetadataToImageModel = z.object({
    input: z.object({
        format: z.string(),
        file: z.object({
            path: z.string(),
        }),
    }),
    copyright: z.optional(z.string()),
    creator: z.optional(z.string()),
    license: z.optional(z.string()),
    keywords: z.optional(z.array(z.string())),
    artist: z.optional(z.string()),
    originalDate: z.optional(z.coerce.date()),
    allDates: z.optional(z.coerce.date()),
    creationDate: z.optional(z.coerce.date()),
    title: z.optional(z.string()),
    description: z.optional(z.string()),
});
//# sourceMappingURL=take.js.map