import type { LTYamlWorkflowRecord } from '../../types/yaml-workflow'; import type { CreateYamlWorkflowInput } from './types'; export { parseVersionFromYaml, updateYamlWorkflowStatus, listYamlWorkflows, findYamlWorkflowsByTags, } from './db-utils'; export { createVersionSnapshot, getVersionHistory, getVersionSnapshot, markContentDeployed, markAppIdContentDeployed, updateCronSchedule, clearCronSchedule, getCronScheduledWorkflows, } from './db-versions'; /** * Check whether a graph_topic is already in use by a non-archived workflow * in the same namespace. Returns the conflicting workflow name, or null. */ export declare function checkTopicConflict(appId: string, graphTopic: string, excludeId?: string): Promise; export declare function createYamlWorkflow(input: CreateYamlWorkflowInput): Promise; export declare function getYamlWorkflow(id: string): Promise; export declare function getYamlWorkflowByName(name: string): Promise; export declare function updateYamlWorkflowVersion(id: string, version: string): Promise; export declare function updateYamlWorkflow(id: string, updates: Partial>): Promise; export declare function deleteYamlWorkflow(id: string): Promise; /** * Ranked discovery: find active workflows matching the user's prompt * via full-text search (tsvector) + tag overlap + optional category filter. */ export declare function discoverWorkflows(prompt: string, tags: string[], category?: string | null, limit?: number): Promise<(LTYamlWorkflowRecord & { fts_rank: number; })[]>; export declare function getActiveYamlWorkflows(): Promise; export declare function listYamlWorkflowsByAppId(appId: string): Promise; /** * Return the next app-level version for a namespace. * * Each deploy of an app (namespace) must use a strictly increasing integer * version. This queries the current max across all non-archived workflows * in the namespace and returns max + 1. * * A new namespace with no workflows returns '1'. * An existing namespace with one active tool at v1 returns '2' when a * second tool is added -- even though that second tool is "version 1" of itself. */ export declare function getNextAppVersion(appId: string): Promise; export declare function getDistinctAppIds(): Promise;