import type { AssemblyInstructionsInput, StepInput, StepInputWithUse } from './types/template.ts'; import type { ZodIssueWithContext } from './zodParseWithContext.ts'; export type NoUseRobot = '/upload/handle' | '/google/import' | '/dropbox/import' | '/supabase/import' | '/swift/import' | '/backblaze/import' | '/ftp/import' | '/cloudfiles/import' | '/cloudflare/import' | '/digitalocean/import' | '/http/import' | '/s3/import' | '/azure/import' | '/minio/import' | '/wasabi/import' | '/edgly/deliver' | '/tlcdn/deliver' | '/sftp/import'; export type StepInputWithoutUse = Omit & { robot: NoUseRobot; }; export declare function doesRobotSupportUse(robot: string): robot is Exclude; export declare function doesStepRobotSupportUse(step: StepInput): step is StepInputWithUse; export interface ParsedTemplateField { mostCommonExampleValue: FieldOccurrence['exampleValues'][number]; fieldName: string; value?: string; occurrences: FieldOccurrence[]; } export interface FieldOccurrence { errors: string[]; exampleValues: (string | number | boolean)[]; leader: string; paramName: string; path: (number | string)[]; requiresDenoEval: boolean; rName: string; stepName: string; trailer: string; } export interface ValidationError { stepName: string; robotName: string; paramName: string; fieldNames: string[]; message: string; value: unknown; } export interface Recommendation { id: string; robotName: string; description: string; applyFunction: (content: string) => string; iconSrc: string; } export interface InterpolatedTemplateError { stepName: string; robotName: string; paramName: string; fieldNames: string[]; message: string; value: unknown; } export declare function nonSignedSmartCDNUrl(argWorkspaceSlug: string, argTemplateSlug: string, argInputField: string, params?: Record): string; export declare function simplifyUse(step: StepInput): StepInput; export declare function getLastUsedStepName(step: StepInput): string | undefined; export declare function addUseReference(step: StepInput, newName: string, opts?: { leading?: boolean; silent?: boolean; }): StepInput; export declare function renameUseReferences(step: StepInput, oldName: string, newName: string): StepInput; export declare function removeUseReference(step: StepInput, nameToRemove: string): StepInput; interface ParseSafeTemplateOpts { silent?: boolean; } export declare const getIndentation: (templateContent: string) => string; export declare class StepParsingError extends Error { zodIssuesWithContext: ZodIssueWithContext[]; humanReadable: string; constructor(message: string, zodIssuesWithContext: ZodIssueWithContext[], humanReadable: string); } export declare const parseSafeTemplate: (templateContent: string, opts?: ParseSafeTemplateOpts) => [StepParsingError, null] | [null, AssemblyInstructionsInput, string]; export declare function botNeedsInput(robotName: string, stepName?: string, step?: StepInput): boolean; export declare function getFirstStepNameThatDoesNotNeedInput(templateContent: string, excludeBots?: string[]): string; export declare const hasRobot: (templateContent: string, rName: string | RegExp, silent?: boolean) => boolean; export declare const doesContentRequireUpload: (templateContent: string, opts?: { silent: boolean; }) => boolean; export declare const canAssemblyJustRun: (templateContent: string) => boolean; export declare function addOptimizeRobots(templateContent: string): string; export declare function removeRobots(templateContent: string, robots?: string[] | RegExp): string; export declare function removeFileServeRobots(templateContent: string): string; export declare function removeUploading(templateContent: string): string; export declare function getRobotList(templateContent: string): string[]; export declare function addStorageRobot(content: string): string; export declare function addFilePreviewRobot(templateContent: string): string; export declare function getRecommendations(templateContent: string, silent?: boolean): Recommendation[]; export declare function addFileServeRobot(templateContent: string): string; export declare function addUploadHandleRobot(templateContent: string): string; export declare function addImportRobot(templateContent: string): string; export declare function addFieldsInput(templateContent: string): string; export declare function extractFieldNamesFromTemplate(templateContent: string): ParsedTemplateField[]; export declare function interpolateFieldsInTemplate(templateContent: string, allFields: ParsedTemplateField[], opts?: { silent: boolean; }): AssemblyInstructionsInput; export declare function validateInterpolatedTemplate(template: AssemblyInstructionsInput, fieldsWithValues: ParsedTemplateField[], fieldNameToValidate?: string): ValidationError[]; export {}; //# sourceMappingURL=stepParsing.d.ts.map