Files
breakpilot-compliance/admin-compliance/app/sdk/sdk-flow/flow-data.ts
Sharang Parnerkar 91063f09b8 refactor(admin): split lib document generators and data catalogs into domain barrels
obligations-document, tom-document, loeschfristen-document, compliance-scope-triggers,
sdk-flow/flow-data, processing-activities, loeschfristen-baseline-catalog,
catalog-registry, dsfa mitigation-library + risk-catalog, vvt-baseline-catalog,
vendor contract-review checklists + findings, demo-data, tom-compliance.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 00:07:03 +02:00

60 lines
2.1 KiB
TypeScript

/**
* SDK Flow Visualization - Step-Definitionen mit Datenfluss
* Barrel re-export — implementation split into sdk-flow/ subdirectory files
*/
export type { SDKFlowStep } from './types'
export { FLOW_PACKAGES } from './types'
export { STEPS_VORBEREITUNG } from './steps-vorbereitung'
export { STEPS_ANALYSE } from './steps-analyse'
export { STEPS_DOKUMENTATION, STEPS_RECHTLICHE_TEXTE } from './steps-dokumentation'
export { STEPS_BETRIEB } from './steps-betrieb'
import { STEPS_VORBEREITUNG } from './steps-vorbereitung'
import { STEPS_ANALYSE } from './steps-analyse'
import { STEPS_DOKUMENTATION, STEPS_RECHTLICHE_TEXTE } from './steps-dokumentation'
import { STEPS_BETRIEB } from './steps-betrieb'
import type { SDKFlowStep } from './types'
export const SDK_FLOW_STEPS: SDKFlowStep[] = [
...STEPS_VORBEREITUNG,
...STEPS_ANALYSE,
...STEPS_DOKUMENTATION,
...STEPS_RECHTLICHE_TEXTE,
...STEPS_BETRIEB,
]
// =============================================================================
// HELPER FUNCTIONS
// =============================================================================
/** Find which step produces a given SDKState property */
export function findProducerStep(property: string): SDKFlowStep | undefined {
return SDK_FLOW_STEPS.find(s => s.outputs.includes(property))
}
/** Get all unique DB tables used across all steps */
export function getAllDbTables(): string[] {
const tables = new Set<string>()
SDK_FLOW_STEPS.forEach(s => s.dbTables.forEach(t => tables.add(t)))
return Array.from(tables)
}
/** Get all unique RAG collections used across all steps */
export function getAllRagCollections(): string[] {
const collections = new Set<string>()
SDK_FLOW_STEPS.forEach(s => s.ragCollections.forEach(c => collections.add(c)))
return Array.from(collections)
}
/** Get steps that use a specific DB table */
export function getStepsUsingTable(table: string): SDKFlowStep[] {
return SDK_FLOW_STEPS.filter(s => s.dbTables.includes(table))
}
/** Get steps that use a specific RAG collection */
export function getStepsUsingRag(collection: string): SDKFlowStep[] {
return SDK_FLOW_STEPS.filter(s => s.ragCollections.includes(collection))
}