From e07e1de6c92e93762c167c6801c5bb00bfb2d534 Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com> Date: Fri, 10 Apr 2026 19:17:38 +0200 Subject: [PATCH] refactor(admin): split api-client.ts (885 LOC) and endpoints.ts (1262 LOC) into focused modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit api-client.ts is now a thin delegating class (263 LOC) backed by: - api-client-types.ts (84) — shared types, config, FetchContext - api-client-state.ts (120) — state CRUD + export - api-client-projects.ts (160) — project management - api-client-wiki.ts (116) — wiki knowledge base - api-client-operations.ts (299) — checkpoints, flow, modules, UCCA, import, screening endpoints.ts is now a barrel (25 LOC) aggregating the 4 existing domain files (endpoints-python-core, endpoints-python-gdpr, endpoints-python-ops, endpoints-go). All files stay under the 500-line hard cap. Build verified with `npx next build`. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../lib/sdk/api-client-operations.ts | 299 ++++ .../lib/sdk/api-client-projects.ts | 160 +++ admin-compliance/lib/sdk/api-client-state.ts | 120 ++ admin-compliance/lib/sdk/api-client-types.ts | 84 ++ admin-compliance/lib/sdk/api-client-wiki.ts | 116 ++ admin-compliance/lib/sdk/api-client.ts | 772 +--------- .../lib/sdk/api-docs/endpoints.ts | 1279 +---------------- 7 files changed, 875 insertions(+), 1955 deletions(-) create mode 100644 admin-compliance/lib/sdk/api-client-operations.ts create mode 100644 admin-compliance/lib/sdk/api-client-projects.ts create mode 100644 admin-compliance/lib/sdk/api-client-state.ts create mode 100644 admin-compliance/lib/sdk/api-client-types.ts create mode 100644 admin-compliance/lib/sdk/api-client-wiki.ts diff --git a/admin-compliance/lib/sdk/api-client-operations.ts b/admin-compliance/lib/sdk/api-client-operations.ts new file mode 100644 index 0000000..21880e9 --- /dev/null +++ b/admin-compliance/lib/sdk/api-client-operations.ts @@ -0,0 +1,299 @@ +/** + * SDK API Client — Operational methods. + * (checkpoints, flow, modules, UCCA, document import, screening, health) + */ + +import { + APIResponse, + CheckpointValidationResult, + FetchContext, + CheckpointStatus, +} from './api-client-types' + +// --------------------------------------------------------------------------- +// Checkpoint Validation +// --------------------------------------------------------------------------- + +/** + * Validate a specific checkpoint + */ +export async function validateCheckpoint( + ctx: FetchContext, + checkpointId: string, + data?: unknown +): Promise { + const response = await ctx.fetchWithRetry>( + `${ctx.baseUrl}/checkpoints/validate`, + { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ + tenantId: ctx.tenantId, + checkpointId, + data, + }), + } + ) + + if (!response.success || !response.data) { + throw ctx.createError(response.error || 'Checkpoint validation failed', 500, true) + } + + return response.data +} + +/** + * Get all checkpoint statuses + */ +export async function getCheckpoints( + ctx: FetchContext +): Promise> { + const response = await ctx.fetchWithRetry>>( + `${ctx.baseUrl}/checkpoints?tenantId=${encodeURIComponent(ctx.tenantId)}`, + { + method: 'GET', + headers: { 'Content-Type': 'application/json' }, + } + ) + + return response.data || {} +} + +// --------------------------------------------------------------------------- +// Flow Navigation +// --------------------------------------------------------------------------- + +/** + * Get current flow state + */ +export async function getFlowState(ctx: FetchContext): Promise<{ + currentStep: string + currentPhase: 1 | 2 + completedSteps: string[] + suggestions: Array<{ stepId: string; reason: string }> +}> { + const response = await ctx.fetchWithRetry + }>>( + `${ctx.baseUrl}/flow?tenantId=${encodeURIComponent(ctx.tenantId)}`, + { + method: 'GET', + headers: { 'Content-Type': 'application/json' }, + } + ) + + if (!response.data) { + throw ctx.createError('Failed to get flow state', 500, true) + } + + return response.data +} + +/** + * Navigate to next/previous step + */ +export async function navigateFlow( + ctx: FetchContext, + direction: 'next' | 'previous' +): Promise<{ stepId: string; phase: 1 | 2 }> { + const response = await ctx.fetchWithRetry>( + `${ctx.baseUrl}/flow`, + { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ + tenantId: ctx.tenantId, + direction, + }), + } + ) + + if (!response.data) { + throw ctx.createError('Failed to navigate flow', 500, true) + } + + return response.data +} + +// --------------------------------------------------------------------------- +// Modules +// --------------------------------------------------------------------------- + +/** + * Get available compliance modules from backend + */ +export async function getModules( + ctx: FetchContext, + filters?: { + serviceType?: string + criticality?: string + processesPii?: boolean + aiComponents?: boolean + } +): Promise<{ modules: unknown[]; total: number }> { + const params = new URLSearchParams() + if (filters?.serviceType) params.set('service_type', filters.serviceType) + if (filters?.criticality) params.set('criticality', filters.criticality) + if (filters?.processesPii !== undefined) params.set('processes_pii', String(filters.processesPii)) + if (filters?.aiComponents !== undefined) params.set('ai_components', String(filters.aiComponents)) + + const queryString = params.toString() + const url = `${ctx.baseUrl}/modules${queryString ? `?${queryString}` : ''}` + + const response = await ctx.fetchWithRetry<{ modules: unknown[]; total: number }>( + url, + { + method: 'GET', + headers: { 'Content-Type': 'application/json' }, + } + ) + + return response +} + +// --------------------------------------------------------------------------- +// UCCA (Use Case Compliance Assessment) +// --------------------------------------------------------------------------- + +/** + * Assess a use case + */ +export async function assessUseCase( + ctx: FetchContext, + intake: unknown +): Promise { + const response = await ctx.fetchWithRetry>( + `${ctx.baseUrl}/ucca/assess`, + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Tenant-ID': ctx.tenantId, + }, + body: JSON.stringify(intake), + } + ) + return response +} + +/** + * Get all assessments + */ +export async function getAssessments(ctx: FetchContext): Promise { + const response = await ctx.fetchWithRetry>( + `${ctx.baseUrl}/ucca/assessments?tenantId=${encodeURIComponent(ctx.tenantId)}`, + { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + 'X-Tenant-ID': ctx.tenantId, + }, + } + ) + return response.data || [] +} + +/** + * Get a single assessment + */ +export async function getAssessment( + ctx: FetchContext, + id: string +): Promise { + const response = await ctx.fetchWithRetry>( + `${ctx.baseUrl}/ucca/assessments/${id}`, + { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + 'X-Tenant-ID': ctx.tenantId, + }, + } + ) + return response.data +} + +/** + * Delete an assessment + */ +export async function deleteAssessment( + ctx: FetchContext, + id: string +): Promise { + await ctx.fetchWithRetry>( + `${ctx.baseUrl}/ucca/assessments/${id}`, + { + method: 'DELETE', + headers: { + 'Content-Type': 'application/json', + 'X-Tenant-ID': ctx.tenantId, + }, + } + ) +} + +// --------------------------------------------------------------------------- +// Document Import & Screening +// --------------------------------------------------------------------------- + +/** + * Analyze an uploaded document + */ +export async function analyzeDocument( + ctx: FetchContext, + formData: FormData +): Promise { + const response = await ctx.fetchWithRetry>( + `${ctx.baseUrl}/import/analyze`, + { + method: 'POST', + headers: { 'X-Tenant-ID': ctx.tenantId }, + body: formData, + } + ) + return response.data +} + +/** + * Scan a dependency file (package-lock.json, requirements.txt, etc.) + */ +export async function scanDependencies( + ctx: FetchContext, + formData: FormData +): Promise { + const response = await ctx.fetchWithRetry>( + `${ctx.baseUrl}/screening/scan`, + { + method: 'POST', + headers: { 'X-Tenant-ID': ctx.tenantId }, + body: formData, + } + ) + return response.data +} + +// --------------------------------------------------------------------------- +// Health +// --------------------------------------------------------------------------- + +/** + * Health check + */ +export async function healthCheck(ctx: FetchContext): Promise { + try { + const response = await ctx.fetchWithTimeout( + `${ctx.baseUrl}/health`, + { method: 'GET' }, + `health-${Date.now()}` + ) + return response.ok + } catch { + return false + } +} diff --git a/admin-compliance/lib/sdk/api-client-projects.ts b/admin-compliance/lib/sdk/api-client-projects.ts new file mode 100644 index 0000000..71a6d1f --- /dev/null +++ b/admin-compliance/lib/sdk/api-client-projects.ts @@ -0,0 +1,160 @@ +/** + * SDK API Client — Project management methods. + * (listProjects, createProject, updateProject, getProject, + * archiveProject, restoreProject, permanentlyDeleteProject) + */ + +import { FetchContext } from './api-client-types' +import { ProjectInfo } from './types' + +/** + * List all projects for the current tenant + */ +export async function listProjects( + ctx: FetchContext, + includeArchived = true +): Promise<{ projects: ProjectInfo[]; total: number }> { + const response = await ctx.fetchWithRetry<{ projects: ProjectInfo[]; total: number }>( + `${ctx.baseUrl}/projects?tenant_id=${encodeURIComponent(ctx.tenantId)}&include_archived=${includeArchived}`, + { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + 'X-Tenant-ID': ctx.tenantId, + }, + } + ) + return response +} + +/** + * Create a new project + */ +export async function createProject( + ctx: FetchContext, + data: { + name: string + description?: string + customer_type?: string + copy_from_project_id?: string + } +): Promise { + const response = await ctx.fetchWithRetry( + `${ctx.baseUrl}/projects?tenant_id=${encodeURIComponent(ctx.tenantId)}`, + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Tenant-ID': ctx.tenantId, + }, + body: JSON.stringify({ + ...data, + tenant_id: ctx.tenantId, + }), + } + ) + return response +} + +/** + * Update an existing project + */ +export async function updateProject( + ctx: FetchContext, + projectId: string, + data: { name?: string; description?: string } +): Promise { + const response = await ctx.fetchWithRetry( + `${ctx.baseUrl}/projects/${projectId}?tenant_id=${encodeURIComponent(ctx.tenantId)}`, + { + method: 'PATCH', + headers: { + 'Content-Type': 'application/json', + 'X-Tenant-ID': ctx.tenantId, + }, + body: JSON.stringify({ + ...data, + tenant_id: ctx.tenantId, + }), + } + ) + return response +} + +/** + * Get a single project by ID + */ +export async function getProject( + ctx: FetchContext, + projectId: string +): Promise { + const response = await ctx.fetchWithRetry( + `${ctx.baseUrl}/projects/${projectId}?tenant_id=${encodeURIComponent(ctx.tenantId)}`, + { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + 'X-Tenant-ID': ctx.tenantId, + }, + } + ) + return response +} + +/** + * Archive (soft-delete) a project + */ +export async function archiveProject( + ctx: FetchContext, + projectId: string +): Promise { + await ctx.fetchWithRetry<{ success: boolean }>( + `${ctx.baseUrl}/projects/${projectId}?tenant_id=${encodeURIComponent(ctx.tenantId)}`, + { + method: 'DELETE', + headers: { + 'Content-Type': 'application/json', + 'X-Tenant-ID': ctx.tenantId, + }, + } + ) +} + +/** + * Restore an archived project + */ +export async function restoreProject( + ctx: FetchContext, + projectId: string +): Promise { + const response = await ctx.fetchWithRetry( + `${ctx.baseUrl}/projects/${projectId}/restore?tenant_id=${encodeURIComponent(ctx.tenantId)}`, + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Tenant-ID': ctx.tenantId, + }, + } + ) + return response +} + +/** + * Permanently delete a project and all data + */ +export async function permanentlyDeleteProject( + ctx: FetchContext, + projectId: string +): Promise { + await ctx.fetchWithRetry<{ success: boolean }>( + `${ctx.baseUrl}/projects/${projectId}/permanent?tenant_id=${encodeURIComponent(ctx.tenantId)}`, + { + method: 'DELETE', + headers: { + 'Content-Type': 'application/json', + 'X-Tenant-ID': ctx.tenantId, + }, + } + ) +} diff --git a/admin-compliance/lib/sdk/api-client-state.ts b/admin-compliance/lib/sdk/api-client-state.ts new file mode 100644 index 0000000..fab3018 --- /dev/null +++ b/admin-compliance/lib/sdk/api-client-state.ts @@ -0,0 +1,120 @@ +/** + * SDK API Client — State management methods. + * (getState, saveState, deleteState, exportState) + */ + +import { + APIResponse, + APIError, + StateResponse, + FetchContext, + SDKState, +} from './api-client-types' + +/** + * Load SDK state for the current tenant + */ +export async function getState(ctx: FetchContext): Promise { + try { + const params = new URLSearchParams({ tenantId: ctx.tenantId }) + if (ctx.projectId) params.set('projectId', ctx.projectId) + const response = await ctx.fetchWithRetry>( + `${ctx.baseUrl}/state?${params.toString()}`, + { + method: 'GET', + headers: { 'Content-Type': 'application/json' }, + } + ) + + if (response.success && response.data) { + return response.data + } + + return null + } catch (error) { + const apiError = error as APIError + // 404 means no state exists yet - that's okay + if (apiError.status === 404) { + return null + } + throw error + } +} + +/** + * Save SDK state for the current tenant. + * Supports optimistic locking via version parameter. + */ +export async function saveState( + ctx: FetchContext, + state: SDKState, + version?: number +): Promise { + const response = await ctx.fetchWithRetry>( + `${ctx.baseUrl}/state`, + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + ...(version !== undefined && { 'If-Match': String(version) }), + }, + body: JSON.stringify({ + tenantId: ctx.tenantId, + projectId: ctx.projectId, + state, + version, + }), + } + ) + + if (!response.success) { + throw ctx.createError(response.error || 'Failed to save state', 500, true) + } + + return response.data! +} + +/** + * Delete SDK state for the current tenant + */ +export async function deleteState(ctx: FetchContext): Promise { + const params = new URLSearchParams({ tenantId: ctx.tenantId }) + if (ctx.projectId) params.set('projectId', ctx.projectId) + await ctx.fetchWithRetry>( + `${ctx.baseUrl}/state?${params.toString()}`, + { + method: 'DELETE', + headers: { 'Content-Type': 'application/json' }, + } + ) +} + +/** + * Export SDK state in various formats + */ +export async function exportState( + ctx: FetchContext, + format: 'json' | 'pdf' | 'zip' +): Promise { + const response = await ctx.fetchWithTimeout( + `${ctx.baseUrl}/export?tenantId=${encodeURIComponent(ctx.tenantId)}&format=${format}`, + { + method: 'GET', + headers: { + 'Accept': + format === 'json' + ? 'application/json' + : format === 'pdf' + ? 'application/pdf' + : 'application/zip', + }, + }, + `export-${Date.now()}` + ) + + if (!response.ok) { + throw ctx.createError(`Export failed: ${response.statusText}`, response.status, true) + } + + return response.blob() +} diff --git a/admin-compliance/lib/sdk/api-client-types.ts b/admin-compliance/lib/sdk/api-client-types.ts new file mode 100644 index 0000000..5afa326 --- /dev/null +++ b/admin-compliance/lib/sdk/api-client-types.ts @@ -0,0 +1,84 @@ +/** + * SDK API Client — shared types, interfaces, and configuration constants. + */ + +import { SDKState, CheckpointStatus } from './types' + +// ============================================================================= +// TYPES +// ============================================================================= + +export interface APIResponse { + success: boolean + data?: T + error?: string + version?: number + lastModified?: string +} + +export interface StateResponse { + tenantId: string + state: SDKState + version: number + lastModified: string +} + +export interface SaveStateRequest { + tenantId: string + state: SDKState + version?: number // For optimistic locking +} + +export interface CheckpointValidationResult { + checkpointId: string + passed: boolean + errors: Array<{ + ruleId: string + field: string + message: string + severity: 'ERROR' | 'WARNING' | 'INFO' + }> + warnings: Array<{ + ruleId: string + field: string + message: string + severity: 'ERROR' | 'WARNING' | 'INFO' + }> + validatedAt: string + validatedBy: string +} + +export interface APIError extends Error { + status?: number + code?: string + retryable: boolean +} + +// ============================================================================= +// CONFIGURATION +// ============================================================================= + +export const DEFAULT_BASE_URL = '/api/sdk/v1' +export const DEFAULT_TIMEOUT = 30000 // 30 seconds +export const MAX_RETRIES = 3 +export const RETRY_DELAYS = [1000, 2000, 4000] // Exponential backoff + +// ============================================================================= +// FETCH CONTEXT — passed to domain helpers +// ============================================================================= + +/** + * Subset of the SDKApiClient that domain helpers need to make requests. + * Avoids exposing the entire class and keeps helpers unit-testable. + */ +export interface FetchContext { + baseUrl: string + tenantId: string + projectId: string | undefined + fetchWithRetry(url: string, options: RequestInit, retries?: number): Promise + fetchWithTimeout(url: string, options: RequestInit, requestId: string): Promise + createError(message: string, status?: number, retryable?: boolean): APIError +} + +// Re-export types that domain helpers need from ./types +export type { SDKState, CheckpointStatus } diff --git a/admin-compliance/lib/sdk/api-client-wiki.ts b/admin-compliance/lib/sdk/api-client-wiki.ts new file mode 100644 index 0000000..6792499 --- /dev/null +++ b/admin-compliance/lib/sdk/api-client-wiki.ts @@ -0,0 +1,116 @@ +/** + * SDK API Client — Wiki (read-only knowledge base) methods. + * (listWikiCategories, listWikiArticles, getWikiArticle, searchWiki) + */ + +import { FetchContext } from './api-client-types' +import { WikiCategory, WikiArticle, WikiSearchResult } from './types' + +/** + * List all wiki categories with article counts + */ +export async function listWikiCategories(ctx: FetchContext): Promise { + const data = await ctx.fetchWithRetry<{ categories: Array<{ + id: string; name: string; description: string; icon: string; + sort_order: number; article_count: number + }> }>( + `${ctx.baseUrl}/wiki?endpoint=categories`, + { method: 'GET' } + ) + return (data.categories || []).map(c => ({ + id: c.id, + name: c.name, + description: c.description, + icon: c.icon, + sortOrder: c.sort_order, + articleCount: c.article_count, + })) +} + +/** + * List wiki articles, optionally filtered by category + */ +export async function listWikiArticles( + ctx: FetchContext, + categoryId?: string +): Promise { + const params = new URLSearchParams({ endpoint: 'articles' }) + if (categoryId) params.set('category_id', categoryId) + const data = await ctx.fetchWithRetry<{ articles: Array<{ + id: string; category_id: string; category_name: string; title: string; + summary: string; content: string; legal_refs: string[]; tags: string[]; + relevance: string; source_urls: string[]; version: number; updated_at: string + }> }>( + `${ctx.baseUrl}/wiki?${params.toString()}`, + { method: 'GET' } + ) + return (data.articles || []).map(a => ({ + id: a.id, + categoryId: a.category_id, + categoryName: a.category_name, + title: a.title, + summary: a.summary, + content: a.content, + legalRefs: a.legal_refs || [], + tags: a.tags || [], + relevance: a.relevance as WikiArticle['relevance'], + sourceUrls: a.source_urls || [], + version: a.version, + updatedAt: a.updated_at, + })) +} + +/** + * Get a single wiki article by ID + */ +export async function getWikiArticle( + ctx: FetchContext, + id: string +): Promise { + const data = await ctx.fetchWithRetry<{ + id: string; category_id: string; category_name: string; title: string; + summary: string; content: string; legal_refs: string[]; tags: string[]; + relevance: string; source_urls: string[]; version: number; updated_at: string + }>( + `${ctx.baseUrl}/wiki?endpoint=article&id=${encodeURIComponent(id)}`, + { method: 'GET' } + ) + return { + id: data.id, + categoryId: data.category_id, + categoryName: data.category_name, + title: data.title, + summary: data.summary, + content: data.content, + legalRefs: data.legal_refs || [], + tags: data.tags || [], + relevance: data.relevance as WikiArticle['relevance'], + sourceUrls: data.source_urls || [], + version: data.version, + updatedAt: data.updated_at, + } +} + +/** + * Full-text search across wiki articles + */ +export async function searchWiki( + ctx: FetchContext, + query: string +): Promise { + const data = await ctx.fetchWithRetry<{ results: Array<{ + id: string; title: string; summary: string; category_name: string; + relevance: string; highlight: string + }> }>( + `${ctx.baseUrl}/wiki?endpoint=search&q=${encodeURIComponent(query)}`, + { method: 'GET' } + ) + return (data.results || []).map(r => ({ + id: r.id, + title: r.title, + summary: r.summary, + categoryName: r.category_name, + relevance: r.relevance, + highlight: r.highlight, + })) +} diff --git a/admin-compliance/lib/sdk/api-client.ts b/admin-compliance/lib/sdk/api-client.ts index 9e707b1..500ea5a 100644 --- a/admin-compliance/lib/sdk/api-client.ts +++ b/admin-compliance/lib/sdk/api-client.ts @@ -3,68 +3,36 @@ * * Centralized API client for SDK state management with error handling, * retry logic, and optimistic locking support. + * + * Domain methods are implemented in sibling files and delegated to here: + * api-client-state.ts — getState, saveState, deleteState, exportState + * api-client-projects.ts — listProjects … permanentlyDeleteProject + * api-client-wiki.ts — listWikiCategories … searchWiki + * api-client-operations.ts — checkpoints, flow, modules, UCCA, import, screening */ import { SDKState, CheckpointStatus, ProjectInfo, WikiCategory, WikiArticle, WikiSearchResult } from './types' +import { + APIResponse, + StateResponse, + SaveStateRequest, + CheckpointValidationResult, + APIError, + FetchContext, + DEFAULT_BASE_URL, + DEFAULT_TIMEOUT, + MAX_RETRIES, + RETRY_DELAYS, +} from './api-client-types' -// ============================================================================= -// TYPES -// ============================================================================= +// Re-export public types so existing consumers keep working +export type { APIResponse, StateResponse, SaveStateRequest, CheckpointValidationResult, APIError } -export interface APIResponse { - success: boolean - data?: T - error?: string - version?: number - lastModified?: string -} - -export interface StateResponse { - tenantId: string - state: SDKState - version: number - lastModified: string -} - -export interface SaveStateRequest { - tenantId: string - state: SDKState - version?: number // For optimistic locking -} - -export interface CheckpointValidationResult { - checkpointId: string - passed: boolean - errors: Array<{ - ruleId: string - field: string - message: string - severity: 'ERROR' | 'WARNING' | 'INFO' - }> - warnings: Array<{ - ruleId: string - field: string - message: string - severity: 'ERROR' | 'WARNING' | 'INFO' - }> - validatedAt: string - validatedBy: string -} - -export interface APIError extends Error { - status?: number - code?: string - retryable: boolean -} - -// ============================================================================= -// CONFIGURATION -// ============================================================================= - -const DEFAULT_BASE_URL = '/api/sdk/v1' -const DEFAULT_TIMEOUT = 30000 // 30 seconds -const MAX_RETRIES = 3 -const RETRY_DELAYS = [1000, 2000, 4000] // Exponential backoff +// Domain helpers +import * as stateHelpers from './api-client-state' +import * as projectHelpers from './api-client-projects' +import * as wikiHelpers from './api-client-wiki' +import * as opsHelpers from './api-client-operations' // ============================================================================= // API CLIENT @@ -90,17 +58,17 @@ export class SDKApiClient { } // --------------------------------------------------------------------------- - // Private Methods + // Private infrastructure — also exposed via FetchContext to helpers // --------------------------------------------------------------------------- - private createError(message: string, status?: number, retryable = false): APIError { + createError(message: string, status?: number, retryable = false): APIError { const error = new Error(message) as APIError error.status = status error.retryable = retryable return error } - private async fetchWithTimeout( + async fetchWithTimeout( url: string, options: RequestInit, requestId: string @@ -122,7 +90,7 @@ export class SDKApiClient { } } - private async fetchWithRetry( + async fetchWithRetry( url: string, options: RequestInit, retries = MAX_RETRIES @@ -182,673 +150,83 @@ export class SDKApiClient { return new Promise(resolve => setTimeout(resolve, ms)) } - // --------------------------------------------------------------------------- - // Public Methods - State Management - // --------------------------------------------------------------------------- - - /** - * Load SDK state for the current tenant - */ - async getState(): Promise { - try { - const params = new URLSearchParams({ tenantId: this.tenantId }) - if (this.projectId) params.set('projectId', this.projectId) - const response = await this.fetchWithRetry>( - `${this.baseUrl}/state?${params.toString()}`, - { - method: 'GET', - headers: { - 'Content-Type': 'application/json', - }, - } - ) - - if (response.success && response.data) { - return response.data - } - - return null - } catch (error) { - const apiError = error as APIError - // 404 means no state exists yet - that's okay - if (apiError.status === 404) { - return null - } - throw error + /** Build a FetchContext for passing to domain helpers */ + private get ctx(): FetchContext { + return { + baseUrl: this.baseUrl, + tenantId: this.tenantId, + projectId: this.projectId, + fetchWithRetry: this.fetchWithRetry.bind(this), + fetchWithTimeout: this.fetchWithTimeout.bind(this), + createError: this.createError.bind(this), } } - /** - * Save SDK state for the current tenant - * Supports optimistic locking via version parameter - */ - async saveState(state: SDKState, version?: number): Promise { - const response = await this.fetchWithRetry>( - `${this.baseUrl}/state`, - { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - ...(version !== undefined && { 'If-Match': String(version) }), - }, - body: JSON.stringify({ - tenantId: this.tenantId, - projectId: this.projectId, - state, - version, - }), - } - ) - - if (!response.success) { - throw this.createError(response.error || 'Failed to save state', 500, true) - } - - return response.data! - } - - /** - * Delete SDK state for the current tenant - */ - async deleteState(): Promise { - const params = new URLSearchParams({ tenantId: this.tenantId }) - if (this.projectId) params.set('projectId', this.projectId) - await this.fetchWithRetry>( - `${this.baseUrl}/state?${params.toString()}`, - { - method: 'DELETE', - headers: { - 'Content-Type': 'application/json', - }, - } - ) - } - // --------------------------------------------------------------------------- - // Public Methods - Checkpoint Validation + // State Management (api-client-state.ts) // --------------------------------------------------------------------------- - /** - * Validate a specific checkpoint - */ - async validateCheckpoint( - checkpointId: string, - data?: unknown - ): Promise { - const response = await this.fetchWithRetry>( - `${this.baseUrl}/checkpoints/validate`, - { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ - tenantId: this.tenantId, - checkpointId, - data, - }), - } - ) - - if (!response.success || !response.data) { - throw this.createError(response.error || 'Checkpoint validation failed', 500, true) - } - - return response.data - } - - /** - * Get all checkpoint statuses - */ - async getCheckpoints(): Promise> { - const response = await this.fetchWithRetry>>( - `${this.baseUrl}/checkpoints?tenantId=${encodeURIComponent(this.tenantId)}`, - { - method: 'GET', - headers: { - 'Content-Type': 'application/json', - }, - } - ) - - return response.data || {} - } + async getState(): Promise { return stateHelpers.getState(this.ctx) } + async saveState(state: SDKState, version?: number): Promise { return stateHelpers.saveState(this.ctx, state, version) } + async deleteState(): Promise { return stateHelpers.deleteState(this.ctx) } + async exportState(format: 'json' | 'pdf' | 'zip'): Promise { return stateHelpers.exportState(this.ctx, format) } // --------------------------------------------------------------------------- - // Public Methods - Flow Navigation + // Checkpoints & Flow (api-client-operations.ts) // --------------------------------------------------------------------------- - /** - * Get current flow state - */ - async getFlowState(): Promise<{ - currentStep: string - currentPhase: 1 | 2 - completedSteps: string[] - suggestions: Array<{ stepId: string; reason: string }> - }> { - const response = await this.fetchWithRetry - }>>( - `${this.baseUrl}/flow?tenantId=${encodeURIComponent(this.tenantId)}`, - { - method: 'GET', - headers: { - 'Content-Type': 'application/json', - }, - } - ) - - if (!response.data) { - throw this.createError('Failed to get flow state', 500, true) - } - - return response.data - } - - /** - * Navigate to next/previous step - */ - async navigateFlow(direction: 'next' | 'previous'): Promise<{ - stepId: string - phase: 1 | 2 - }> { - const response = await this.fetchWithRetry>( - `${this.baseUrl}/flow`, - { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ - tenantId: this.tenantId, - direction, - }), - } - ) - - if (!response.data) { - throw this.createError('Failed to navigate flow', 500, true) - } - - return response.data - } + async validateCheckpoint(checkpointId: string, data?: unknown): Promise { return opsHelpers.validateCheckpoint(this.ctx, checkpointId, data) } + async getCheckpoints(): Promise> { return opsHelpers.getCheckpoints(this.ctx) } + async getFlowState() { return opsHelpers.getFlowState(this.ctx) } + async navigateFlow(direction: 'next' | 'previous') { return opsHelpers.navigateFlow(this.ctx, direction) } // --------------------------------------------------------------------------- - // Public Methods - Modules + // Modules, UCCA, Import, Screening, Health (api-client-operations.ts) // --------------------------------------------------------------------------- - /** - * Get available compliance modules from backend - */ - async getModules(filters?: { - serviceType?: string - criticality?: string - processesPii?: boolean - aiComponents?: boolean - }): Promise<{ modules: unknown[]; total: number }> { - const params = new URLSearchParams() - if (filters?.serviceType) params.set('service_type', filters.serviceType) - if (filters?.criticality) params.set('criticality', filters.criticality) - if (filters?.processesPii !== undefined) params.set('processes_pii', String(filters.processesPii)) - if (filters?.aiComponents !== undefined) params.set('ai_components', String(filters.aiComponents)) - - const queryString = params.toString() - const url = `${this.baseUrl}/modules${queryString ? `?${queryString}` : ''}` - - const response = await this.fetchWithRetry<{ modules: unknown[]; total: number }>( - url, - { - method: 'GET', - headers: { 'Content-Type': 'application/json' }, - } - ) - - return response - } + async getModules(filters?: Parameters[1]) { return opsHelpers.getModules(this.ctx, filters) } + async assessUseCase(intake: unknown) { return opsHelpers.assessUseCase(this.ctx, intake) } + async getAssessments() { return opsHelpers.getAssessments(this.ctx) } + async getAssessment(id: string) { return opsHelpers.getAssessment(this.ctx, id) } + async deleteAssessment(id: string) { return opsHelpers.deleteAssessment(this.ctx, id) } + async analyzeDocument(formData: FormData) { return opsHelpers.analyzeDocument(this.ctx, formData) } + async scanDependencies(formData: FormData) { return opsHelpers.scanDependencies(this.ctx, formData) } + async healthCheck() { return opsHelpers.healthCheck(this.ctx) } // --------------------------------------------------------------------------- - // Public Methods - UCCA (Use Case Compliance Assessment) + // Projects (api-client-projects.ts) // --------------------------------------------------------------------------- - /** - * Assess a use case - */ - async assessUseCase(intake: unknown): Promise { - const response = await this.fetchWithRetry>( - `${this.baseUrl}/ucca/assess`, - { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'X-Tenant-ID': this.tenantId, - }, - body: JSON.stringify(intake), - } - ) - return response - } - - /** - * Get all assessments - */ - async getAssessments(): Promise { - const response = await this.fetchWithRetry>( - `${this.baseUrl}/ucca/assessments?tenantId=${encodeURIComponent(this.tenantId)}`, - { - method: 'GET', - headers: { - 'Content-Type': 'application/json', - 'X-Tenant-ID': this.tenantId, - }, - } - ) - return response.data || [] - } - - /** - * Get a single assessment - */ - async getAssessment(id: string): Promise { - const response = await this.fetchWithRetry>( - `${this.baseUrl}/ucca/assessments/${id}`, - { - method: 'GET', - headers: { - 'Content-Type': 'application/json', - 'X-Tenant-ID': this.tenantId, - }, - } - ) - return response.data - } - - /** - * Delete an assessment - */ - async deleteAssessment(id: string): Promise { - await this.fetchWithRetry>( - `${this.baseUrl}/ucca/assessments/${id}`, - { - method: 'DELETE', - headers: { - 'Content-Type': 'application/json', - 'X-Tenant-ID': this.tenantId, - }, - } - ) - } + async listProjects(includeArchived = true) { return projectHelpers.listProjects(this.ctx, includeArchived) } + async createProject(data: Parameters[1]) { return projectHelpers.createProject(this.ctx, data) } + async updateProject(projectId: string, data: Parameters[2]) { return projectHelpers.updateProject(this.ctx, projectId, data) } + async getProject(projectId: string) { return projectHelpers.getProject(this.ctx, projectId) } + async archiveProject(projectId: string) { return projectHelpers.archiveProject(this.ctx, projectId) } + async restoreProject(projectId: string) { return projectHelpers.restoreProject(this.ctx, projectId) } + async permanentlyDeleteProject(projectId: string) { return projectHelpers.permanentlyDeleteProject(this.ctx, projectId) } // --------------------------------------------------------------------------- - // Public Methods - Document Import + // Wiki (api-client-wiki.ts) // --------------------------------------------------------------------------- - /** - * Analyze an uploaded document - */ - async analyzeDocument(formData: FormData): Promise { - const response = await this.fetchWithRetry>( - `${this.baseUrl}/import/analyze`, - { - method: 'POST', - headers: { - 'X-Tenant-ID': this.tenantId, - }, - body: formData, - } - ) - return response.data - } + async listWikiCategories() { return wikiHelpers.listWikiCategories(this.ctx) } + async listWikiArticles(categoryId?: string) { return wikiHelpers.listWikiArticles(this.ctx, categoryId) } + async getWikiArticle(id: string) { return wikiHelpers.getWikiArticle(this.ctx, id) } + async searchWiki(query: string) { return wikiHelpers.searchWiki(this.ctx, query) } // --------------------------------------------------------------------------- - // Public Methods - System Screening + // Utility // --------------------------------------------------------------------------- - /** - * Scan a dependency file (package-lock.json, requirements.txt, etc.) - */ - async scanDependencies(formData: FormData): Promise { - const response = await this.fetchWithRetry>( - `${this.baseUrl}/screening/scan`, - { - method: 'POST', - headers: { - 'X-Tenant-ID': this.tenantId, - }, - body: formData, - } - ) - return response.data - } - - // --------------------------------------------------------------------------- - // Public Methods - Export - // --------------------------------------------------------------------------- - - /** - * Export SDK state in various formats - */ - async exportState(format: 'json' | 'pdf' | 'zip'): Promise { - const response = await this.fetchWithTimeout( - `${this.baseUrl}/export?tenantId=${encodeURIComponent(this.tenantId)}&format=${format}`, - { - method: 'GET', - headers: { - 'Accept': format === 'json' ? 'application/json' : format === 'pdf' ? 'application/pdf' : 'application/zip', - }, - }, - `export-${Date.now()}` - ) - - if (!response.ok) { - throw this.createError(`Export failed: ${response.statusText}`, response.status, true) - } - - return response.blob() - } - - // --------------------------------------------------------------------------- - // Public Methods - Utility - // --------------------------------------------------------------------------- - - /** - * Cancel all pending requests - */ cancelAllRequests(): void { this.abortControllers.forEach(controller => controller.abort()) this.abortControllers.clear() } - /** - * Update tenant ID (useful when switching contexts) - */ - setTenantId(tenantId: string): void { - this.tenantId = tenantId - } - - /** - * Get current tenant ID - */ - getTenantId(): string { - return this.tenantId - } - - /** - * Set project ID for multi-project support - */ - setProjectId(projectId: string | undefined): void { - this.projectId = projectId - } - - /** - * Get current project ID - */ - getProjectId(): string | undefined { - return this.projectId - } - - // --------------------------------------------------------------------------- - // Public Methods - Project Management - // --------------------------------------------------------------------------- - - /** - * List all projects for the current tenant - */ - async listProjects(includeArchived = true): Promise<{ projects: ProjectInfo[]; total: number }> { - const response = await this.fetchWithRetry<{ projects: ProjectInfo[]; total: number }>( - `${this.baseUrl}/projects?tenant_id=${encodeURIComponent(this.tenantId)}&include_archived=${includeArchived}`, - { - method: 'GET', - headers: { - 'Content-Type': 'application/json', - 'X-Tenant-ID': this.tenantId, - }, - } - ) - return response - } - - /** - * Create a new project - */ - async createProject(data: { - name: string - description?: string - customer_type?: string - copy_from_project_id?: string - }): Promise { - const response = await this.fetchWithRetry( - `${this.baseUrl}/projects?tenant_id=${encodeURIComponent(this.tenantId)}`, - { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'X-Tenant-ID': this.tenantId, - }, - body: JSON.stringify({ - ...data, - tenant_id: this.tenantId, - }), - } - ) - return response - } - - /** - * Update an existing project - */ - async updateProject(projectId: string, data: { - name?: string - description?: string - }): Promise { - const response = await this.fetchWithRetry( - `${this.baseUrl}/projects/${projectId}?tenant_id=${encodeURIComponent(this.tenantId)}`, - { - method: 'PATCH', - headers: { - 'Content-Type': 'application/json', - 'X-Tenant-ID': this.tenantId, - }, - body: JSON.stringify({ - ...data, - tenant_id: this.tenantId, - }), - } - ) - return response - } - - /** - * Get a single project by ID - */ - async getProject(projectId: string): Promise { - const response = await this.fetchWithRetry( - `${this.baseUrl}/projects/${projectId}?tenant_id=${encodeURIComponent(this.tenantId)}`, - { - method: 'GET', - headers: { - 'Content-Type': 'application/json', - 'X-Tenant-ID': this.tenantId, - }, - } - ) - return response - } - - /** - * Archive (soft-delete) a project - */ - async archiveProject(projectId: string): Promise { - await this.fetchWithRetry<{ success: boolean }>( - `${this.baseUrl}/projects/${projectId}?tenant_id=${encodeURIComponent(this.tenantId)}`, - { - method: 'DELETE', - headers: { - 'Content-Type': 'application/json', - 'X-Tenant-ID': this.tenantId, - }, - } - ) - } - - /** - * Restore an archived project - */ - async restoreProject(projectId: string): Promise { - const response = await this.fetchWithRetry( - `${this.baseUrl}/projects/${projectId}/restore?tenant_id=${encodeURIComponent(this.tenantId)}`, - { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'X-Tenant-ID': this.tenantId, - }, - } - ) - return response - } - - /** - * Permanently delete a project and all data - */ - async permanentlyDeleteProject(projectId: string): Promise { - await this.fetchWithRetry<{ success: boolean }>( - `${this.baseUrl}/projects/${projectId}/permanent?tenant_id=${encodeURIComponent(this.tenantId)}`, - { - method: 'DELETE', - headers: { - 'Content-Type': 'application/json', - 'X-Tenant-ID': this.tenantId, - }, - } - ) - } - - // =========================================================================== - // WIKI (read-only knowledge base) - // =========================================================================== - - /** - * List all wiki categories with article counts - */ - async listWikiCategories(): Promise { - const data = await this.fetchWithRetry<{ categories: Array<{ - id: string; name: string; description: string; icon: string; - sort_order: number; article_count: number - }> }>( - `${this.baseUrl}/wiki?endpoint=categories`, - { method: 'GET' } - ) - return (data.categories || []).map(c => ({ - id: c.id, - name: c.name, - description: c.description, - icon: c.icon, - sortOrder: c.sort_order, - articleCount: c.article_count, - })) - } - - /** - * List wiki articles, optionally filtered by category - */ - async listWikiArticles(categoryId?: string): Promise { - const params = new URLSearchParams({ endpoint: 'articles' }) - if (categoryId) params.set('category_id', categoryId) - const data = await this.fetchWithRetry<{ articles: Array<{ - id: string; category_id: string; category_name: string; title: string; - summary: string; content: string; legal_refs: string[]; tags: string[]; - relevance: string; source_urls: string[]; version: number; updated_at: string - }> }>( - `${this.baseUrl}/wiki?${params.toString()}`, - { method: 'GET' } - ) - return (data.articles || []).map(a => ({ - id: a.id, - categoryId: a.category_id, - categoryName: a.category_name, - title: a.title, - summary: a.summary, - content: a.content, - legalRefs: a.legal_refs || [], - tags: a.tags || [], - relevance: a.relevance as WikiArticle['relevance'], - sourceUrls: a.source_urls || [], - version: a.version, - updatedAt: a.updated_at, - })) - } - - /** - * Get a single wiki article by ID - */ - async getWikiArticle(id: string): Promise { - const data = await this.fetchWithRetry<{ - id: string; category_id: string; category_name: string; title: string; - summary: string; content: string; legal_refs: string[]; tags: string[]; - relevance: string; source_urls: string[]; version: number; updated_at: string - }>( - `${this.baseUrl}/wiki?endpoint=article&id=${encodeURIComponent(id)}`, - { method: 'GET' } - ) - return { - id: data.id, - categoryId: data.category_id, - categoryName: data.category_name, - title: data.title, - summary: data.summary, - content: data.content, - legalRefs: data.legal_refs || [], - tags: data.tags || [], - relevance: data.relevance as WikiArticle['relevance'], - sourceUrls: data.source_urls || [], - version: data.version, - updatedAt: data.updated_at, - } - } - - /** - * Full-text search across wiki articles - */ - async searchWiki(query: string): Promise { - const data = await this.fetchWithRetry<{ results: Array<{ - id: string; title: string; summary: string; category_name: string; - relevance: string; highlight: string - }> }>( - `${this.baseUrl}/wiki?endpoint=search&q=${encodeURIComponent(query)}`, - { method: 'GET' } - ) - return (data.results || []).map(r => ({ - id: r.id, - title: r.title, - summary: r.summary, - categoryName: r.category_name, - relevance: r.relevance, - highlight: r.highlight, - })) - } - - /** - * Health check - */ - async healthCheck(): Promise { - try { - const response = await this.fetchWithTimeout( - `${this.baseUrl}/health`, - { method: 'GET' }, - `health-${Date.now()}` - ) - return response.ok - } catch { - return false - } - } + setTenantId(tenantId: string): void { this.tenantId = tenantId } + getTenantId(): string { return this.tenantId } + setProjectId(projectId: string | undefined): void { this.projectId = projectId } + getProjectId(): string | undefined { return this.projectId } } // ============================================================================= diff --git a/admin-compliance/lib/sdk/api-docs/endpoints.ts b/admin-compliance/lib/sdk/api-docs/endpoints.ts index 9fd0fed..a9dc467 100644 --- a/admin-compliance/lib/sdk/api-docs/endpoints.ts +++ b/admin-compliance/lib/sdk/api-docs/endpoints.ts @@ -1,1262 +1,25 @@ +/** + * API Documentation — endpoint definitions (barrel). + * + * All endpoint data lives in domain-specific sibling files: + * endpoints-python-core.ts — core compliance framework, audit, projects, etc. + * endpoints-python-gdpr.ts — GDPR, DSR, consent, data-subject modules + * endpoints-python-ops.ts — TOM, VVT, vendor, ISMS, incidents, etc. + * endpoints-go.ts — Go/Gin AI compliance SDK modules + * + * This file aggregates them into a single `apiModules` array that the + * API docs page consumes. + */ + import { ApiModule } from './types' +import { pythonCoreModules } from './endpoints-python-core' +import { pythonGdprModules } from './endpoints-python-gdpr' +import { pythonOpsModules } from './endpoints-python-ops' +import { goModules } from './endpoints-go' export const apiModules: ApiModule[] = [ - // ============================================================ - // PYTHON / FASTAPI BACKEND (backend-compliance, Port 8002) - // ============================================================ - - { - id: 'compliance-framework', - name: 'Compliance Framework — Regulierungen, Anforderungen & Controls', - service: 'python', - basePath: '/api/compliance', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/regulations', description: 'Alle Regulierungen auflisten', service: 'python' }, - { method: 'GET', path: '/regulations/{code}', description: 'Regulierung nach Code laden', service: 'python' }, - { method: 'GET', path: '/regulations/{code}/requirements', description: 'Anforderungen einer Regulierung', service: 'python' }, - { method: 'GET', path: '/requirements', description: 'Anforderungen auflisten (paginiert)', service: 'python' }, - { method: 'GET', path: '/requirements/{requirement_id}', description: 'Einzelne Anforderung laden', service: 'python' }, - { method: 'POST', path: '/requirements', description: 'Anforderung erstellen', service: 'python' }, - { method: 'PUT', path: '/requirements/{requirement_id}', description: 'Anforderung aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/requirements/{requirement_id}', description: 'Anforderung loeschen', service: 'python' }, - { method: 'GET', path: '/controls', description: 'Alle Controls auflisten', service: 'python' }, - { method: 'GET', path: '/controls/paginated', description: 'Controls paginiert laden', service: 'python' }, - { method: 'GET', path: '/controls/{control_id}', description: 'Einzelnes Control laden', service: 'python' }, - { method: 'PUT', path: '/controls/{control_id}', description: 'Control aktualisieren', service: 'python' }, - { method: 'PUT', path: '/controls/{control_id}/review', description: 'Control-Review durchfuehren', service: 'python' }, - { method: 'GET', path: '/controls/by-domain/{domain}', description: 'Controls nach Domain filtern', service: 'python' }, - { method: 'POST', path: '/export', description: 'Audit-Export erstellen', service: 'python' }, - { method: 'GET', path: '/export/{export_id}', description: 'Export-Status abfragen', service: 'python' }, - { method: 'GET', path: '/export/{export_id}/download', description: 'Export-Datei herunterladen', service: 'python' }, - { method: 'GET', path: '/exports', description: 'Alle Exports auflisten', service: 'python' }, - { method: 'POST', path: '/init-tables', description: 'Datenbanktabellen initialisieren', service: 'python', exposure: 'admin' }, - { method: 'POST', path: '/create-indexes', description: 'Datenbank-Indizes erstellen', service: 'python', exposure: 'admin' }, - { method: 'POST', path: '/seed-risks', description: 'Risikodaten einspielen', service: 'python', exposure: 'admin' }, - { method: 'POST', path: '/seed', description: 'Systemdaten einspielen', service: 'python', exposure: 'admin' }, - ], - }, - - { - id: 'audit', - name: 'Audit — Sitzungen & Checklisten', - service: 'python', - basePath: '/api/compliance/audit', - exposure: 'internal', - endpoints: [ - { method: 'POST', path: '/sessions', description: 'Audit-Sitzung erstellen', service: 'python' }, - { method: 'GET', path: '/sessions', description: 'Alle Audit-Sitzungen auflisten', service: 'python' }, - { method: 'GET', path: '/sessions/{session_id}', description: 'Sitzung laden', service: 'python' }, - { method: 'PUT', path: '/sessions/{session_id}/start', description: 'Sitzung starten', service: 'python' }, - { method: 'PUT', path: '/sessions/{session_id}/complete', description: 'Sitzung abschliessen', service: 'python' }, - { method: 'PUT', path: '/sessions/{session_id}/archive', description: 'Sitzung archivieren', service: 'python' }, - { method: 'DELETE', path: '/sessions/{session_id}', description: 'Sitzung loeschen', service: 'python' }, - { method: 'GET', path: '/sessions/{session_id}/report/pdf', description: 'Sitzungsbericht als PDF exportieren', service: 'python' }, - { method: 'GET', path: '/checklist/{session_id}', description: 'Checkliste einer Sitzung laden', service: 'python' }, - { method: 'PUT', path: '/checklist/{session_id}/items/{requirement_id}/sign-off', description: 'Anforderung abzeichnen', service: 'python' }, - { method: 'GET', path: '/checklist/{session_id}/items/{requirement_id}', description: 'Abzeichnung-Details laden', service: 'python' }, - ], - }, - - { - id: 'ai-systems', - name: 'AI Act — KI-Systeme & Risikobewertung', - service: 'python', - basePath: '/api/compliance/ai', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/systems', description: 'KI-Systeme auflisten', service: 'python' }, - { method: 'POST', path: '/systems', description: 'KI-System erstellen', service: 'python' }, - { method: 'GET', path: '/systems/{system_id}', description: 'KI-System laden', service: 'python' }, - { method: 'PUT', path: '/systems/{system_id}', description: 'KI-System aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/systems/{system_id}', description: 'KI-System loeschen', service: 'python' }, - { method: 'POST', path: '/systems/{system_id}/assess', description: 'KI-Compliance bewerten', service: 'python' }, - ], - }, - - { - id: 'banner', - name: 'Cookie-Banner & Consent Management', - service: 'python', - basePath: '/api/compliance/consent', - exposure: 'internal', - endpoints: [ - { method: 'POST', path: '/consent', description: 'Einwilligung erfassen', service: 'python', exposure: 'public' }, - { method: 'GET', path: '/consent', description: 'Einwilligungen auflisten', service: 'python' }, - { method: 'DELETE', path: '/consent/{consent_id}', description: 'Einwilligung loeschen', service: 'python' }, - { method: 'GET', path: '/consent/export', description: 'Einwilligungsdaten exportieren', service: 'python' }, - { method: 'GET', path: '/config/{site_id}', description: 'Seitenkonfiguration laden', service: 'python', exposure: 'public' }, - { method: 'GET', path: '/admin/sites', description: 'Alle Seiten auflisten', service: 'python' }, - { method: 'POST', path: '/admin/sites', description: 'Seite erstellen', service: 'python' }, - { method: 'PUT', path: '/admin/sites/{site_id}', description: 'Seite aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/admin/sites/{site_id}', description: 'Seite loeschen', service: 'python' }, - { method: 'GET', path: '/admin/sites/{site_id}/categories', description: 'Cookie-Kategorien auflisten', service: 'python' }, - { method: 'POST', path: '/admin/sites/{site_id}/categories', description: 'Cookie-Kategorie erstellen', service: 'python' }, - { method: 'DELETE', path: '/admin/categories/{category_id}', description: 'Cookie-Kategorie loeschen', service: 'python' }, - { method: 'GET', path: '/admin/sites/{site_id}/vendors', description: 'Anbieter auflisten', service: 'python' }, - { method: 'POST', path: '/admin/sites/{site_id}/vendors', description: 'Anbieter hinzufuegen', service: 'python' }, - { method: 'DELETE', path: '/admin/vendors/{vendor_id}', description: 'Anbieter loeschen', service: 'python' }, - { method: 'GET', path: '/admin/stats/{site_id}', description: 'Seiten-Statistiken laden', service: 'python' }, - ], - }, - - { - id: 'change-requests', - name: 'Change Requests — Aenderungsantraege', - service: 'python', - basePath: '/api/compliance/change-requests', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/stats', description: 'CR-Statistiken laden', service: 'python' }, - { method: 'GET', path: '/{cr_id}', description: 'Einzelnen CR laden', service: 'python' }, - { method: 'POST', path: '/{cr_id}/accept', description: 'CR akzeptieren', service: 'python' }, - { method: 'POST', path: '/{cr_id}/reject', description: 'CR ablehnen', service: 'python' }, - { method: 'POST', path: '/{cr_id}/edit', description: 'CR bearbeiten', service: 'python' }, - { method: 'DELETE', path: '/{cr_id}', description: 'CR loeschen', service: 'python' }, - ], - }, - - { - id: 'company-profile', - name: 'Stammdaten — Unternehmensprofil', - service: 'python', - basePath: '/api/v1/company-profile', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/', description: 'Unternehmensprofil laden', service: 'python' }, - { method: 'POST', path: '/', description: 'Profil erstellen/aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/', description: 'Profil loeschen', service: 'python' }, - { method: 'GET', path: '/template-context', description: 'Profil als Template-Kontext (flach)', service: 'python' }, - { method: 'GET', path: '/audit', description: 'Profil-Aenderungsprotokoll laden', service: 'python' }, - ], - }, - - { - id: 'projects', - name: 'Projekte — Multi-Projekt-Verwaltung', - service: 'python', - basePath: '/api/compliance/v1/projects', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/', description: 'Alle Projekte des Tenants auflisten', service: 'python' }, - { method: 'POST', path: '/', description: 'Neues Projekt erstellen (optional mit Stammdaten-Kopie)', service: 'python' }, - { method: 'GET', path: '/{project_id}', description: 'Einzelnes Projekt laden', service: 'python' }, - { method: 'PATCH', path: '/{project_id}', description: 'Projekt aktualisieren (Name, Beschreibung)', service: 'python' }, - { method: 'DELETE', path: '/{project_id}', description: 'Projekt archivieren (Soft Delete)', service: 'python' }, - ], - }, - - { - id: 'compliance-scope', - name: 'Compliance Scope — Geltungsbereich', - service: 'python', - basePath: '/api/v1/compliance-scope', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/', description: 'Compliance-Scope laden', service: 'python' }, - { method: 'POST', path: '/', description: 'Compliance-Scope erstellen/aktualisieren', service: 'python' }, - ], - }, - - { - id: 'consent-templates', - name: 'Einwilligungsvorlagen — Consent Templates', - service: 'python', - basePath: '/api/compliance/consent-templates', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/consent-templates', description: 'Vorlagen auflisten', service: 'python' }, - { method: 'POST', path: '/consent-templates', description: 'Vorlage erstellen', service: 'python' }, - { method: 'PUT', path: '/consent-templates/{template_id}', description: 'Vorlage aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/consent-templates/{template_id}', description: 'Vorlage loeschen', service: 'python' }, - { method: 'GET', path: '/gdpr-processes', description: 'DSGVO-Prozesse auflisten', service: 'python' }, - { method: 'PUT', path: '/gdpr-processes/{process_id}', description: 'DSGVO-Prozess aktualisieren', service: 'python' }, - ], - }, - - { - id: 'dashboard', - name: 'Dashboard — Compliance-Uebersicht & Reports', - service: 'python', - basePath: '/api/compliance/dashboard', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/dashboard', description: 'Haupt-Dashboard laden', service: 'python' }, - { method: 'GET', path: '/score', description: 'Compliance-Score berechnen', service: 'python' }, - { method: 'GET', path: '/dashboard/executive', description: 'Executive-Dashboard laden', service: 'python' }, - { method: 'GET', path: '/dashboard/trend', description: 'Compliance-Trendverlauf laden', service: 'python' }, - { method: 'GET', path: '/reports/summary', description: 'Zusammenfassungsbericht laden', service: 'python' }, - { method: 'GET', path: '/reports/{period}', description: 'Periodenbericht generieren', service: 'python' }, - ], - }, - - { - id: 'dsfa', - name: 'DSFA — Datenschutz-Folgenabschaetzung', - service: 'python', - basePath: '/api/compliance/dsfa', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/', description: 'DSFAs auflisten', service: 'python' }, - { method: 'POST', path: '/', description: 'DSFA erstellen', service: 'python' }, - { method: 'GET', path: '/{dsfa_id}', description: 'DSFA laden', service: 'python' }, - { method: 'PUT', path: '/{dsfa_id}', description: 'DSFA aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/{dsfa_id}', description: 'DSFA loeschen', service: 'python' }, - { method: 'PATCH', path: '/{dsfa_id}/status', description: 'DSFA-Status aendern', service: 'python' }, - { method: 'PUT', path: '/{dsfa_id}/sections/{section_number}', description: 'DSFA-Abschnitt aktualisieren', service: 'python' }, - { method: 'POST', path: '/{dsfa_id}/submit-for-review', description: 'Zur Pruefung einreichen', service: 'python' }, - { method: 'POST', path: '/{dsfa_id}/approve', description: 'DSFA genehmigen', service: 'python' }, - { method: 'GET', path: '/{dsfa_id}/export', description: 'DSFA als JSON exportieren', service: 'python' }, - { method: 'GET', path: '/{dsfa_id}/versions', description: 'Versionshistorie laden', service: 'python' }, - { method: 'GET', path: '/{dsfa_id}/versions/{version_number}', description: 'Bestimmte Version laden', service: 'python' }, - { method: 'GET', path: '/stats', description: 'DSFA-Statistiken laden', service: 'python' }, - { method: 'GET', path: '/audit-log', description: 'DSFA-Audit-Log laden', service: 'python' }, - { method: 'GET', path: '/export/csv', description: 'Alle DSFAs als CSV exportieren', service: 'python' }, - ], - }, - - { - id: 'dsr', - name: 'DSR — Betroffenenrechte (Admin)', - service: 'python', - basePath: '/api/compliance/dsr', - exposure: 'internal', - endpoints: [ - { method: 'POST', path: '/', description: 'DSR erstellen', service: 'python' }, - { method: 'GET', path: '/', description: 'DSRs auflisten', service: 'python' }, - { method: 'GET', path: '/{dsr_id}', description: 'DSR laden', service: 'python' }, - { method: 'PUT', path: '/{dsr_id}', description: 'DSR aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/{dsr_id}', description: 'DSR loeschen', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/status', description: 'Status aendern', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/verify-identity', description: 'Identitaet verifizieren', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/assign', description: 'DSR zuweisen', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/extend', description: 'Frist verlaengern', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/complete', description: 'DSR abschliessen', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/reject', description: 'DSR ablehnen', service: 'python' }, - { method: 'GET', path: '/{dsr_id}/history', description: 'Antragshistorie laden', service: 'python' }, - { method: 'GET', path: '/{dsr_id}/communications', description: 'Kommunikation laden', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/communicate', description: 'Nachricht senden', service: 'python' }, - { method: 'GET', path: '/{dsr_id}/exception-checks', description: 'Ausnahme-Checks laden', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/exception-checks/init', description: 'Ausnahme-Checks initialisieren', service: 'python' }, - { method: 'PUT', path: '/{dsr_id}/exception-checks/{check_id}', description: 'Ausnahme-Check aktualisieren', service: 'python' }, - { method: 'GET', path: '/stats', description: 'DSR-Statistiken laden', service: 'python' }, - { method: 'GET', path: '/export', description: 'DSRs exportieren', service: 'python' }, - { method: 'POST', path: '/deadlines/process', description: 'Fristen verarbeiten', service: 'python' }, - { method: 'GET', path: '/templates', description: 'DSR-Vorlagen laden', service: 'python' }, - { method: 'GET', path: '/templates/published', description: 'Veroeffentlichte Vorlagen laden', service: 'python' }, - { method: 'GET', path: '/templates/{template_id}/versions', description: 'Vorlagen-Versionen laden', service: 'python' }, - { method: 'POST', path: '/templates/{template_id}/versions', description: 'Vorlagen-Version erstellen', service: 'python' }, - { method: 'PUT', path: '/template-versions/{version_id}/publish', description: 'Vorlagen-Version veroeffentlichen', service: 'python' }, - ], - }, - - { - id: 'einwilligungen', - name: 'Einwilligungen — DSGVO-Einwilligungsverwaltung', - service: 'python', - basePath: '/api/compliance/einwilligungen', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/catalog', description: 'Einwilligungskatalog laden', service: 'python' }, - { method: 'PUT', path: '/catalog', description: 'Katalog aktualisieren', service: 'python' }, - { method: 'GET', path: '/company', description: 'Unternehmens-Consent-Einstellungen laden', service: 'python' }, - { method: 'PUT', path: '/company', description: 'Einstellungen aktualisieren', service: 'python' }, - { method: 'GET', path: '/cookies', description: 'Cookie-Einwilligungen laden', service: 'python' }, - { method: 'PUT', path: '/cookies', description: 'Cookie-Einwilligungen aktualisieren', service: 'python' }, - { method: 'GET', path: '/consents/stats', description: 'Statistiken laden', service: 'python' }, - { method: 'GET', path: '/consents', description: 'Einwilligungen auflisten (paginiert)', service: 'python' }, - { method: 'POST', path: '/consents', description: 'Einwilligung erstellen', service: 'python' }, - { method: 'GET', path: '/consents/{consent_id}/history', description: 'Einwilligungshistorie laden', service: 'python' }, - { method: 'PUT', path: '/consents/{consent_id}/revoke', description: 'Einwilligung widerrufen', service: 'python' }, - ], - }, - - { - id: 'email-templates', - name: 'E-Mail-Vorlagen — Template-Verwaltung', - service: 'python', - basePath: '/api/compliance/email-templates', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/types', description: 'Vorlagentypen laden', service: 'python' }, - { method: 'GET', path: '/stats', description: 'E-Mail-Statistiken laden', service: 'python' }, - { method: 'GET', path: '/settings', description: 'E-Mail-Einstellungen laden', service: 'python' }, - { method: 'PUT', path: '/settings', description: 'E-Mail-Einstellungen aktualisieren', service: 'python' }, - { method: 'GET', path: '/logs', description: 'Versandprotokoll laden', service: 'python' }, - { method: 'POST', path: '/initialize', description: 'Standard-Vorlagen initialisieren', service: 'python' }, - { method: 'GET', path: '/', description: 'Vorlagen auflisten', service: 'python' }, - { method: 'POST', path: '/', description: 'Vorlage erstellen', service: 'python' }, - { method: 'GET', path: '/{template_id}', description: 'Vorlage laden', service: 'python' }, - { method: 'GET', path: '/{template_id}/versions', description: 'Vorlagen-Versionen laden', service: 'python' }, - { method: 'POST', path: '/{template_id}/versions', description: 'Version erstellen', service: 'python' }, - { method: 'POST', path: '/versions', description: 'Version erstellen (alternativ)', service: 'python' }, - { method: 'GET', path: '/versions/{version_id}', description: 'Version laden', service: 'python' }, - { method: 'PUT', path: '/versions/{version_id}', description: 'Version aktualisieren', service: 'python' }, - { method: 'POST', path: '/versions/{version_id}/submit', description: 'Version einreichen', service: 'python' }, - { method: 'POST', path: '/versions/{version_id}/approve', description: 'Version genehmigen', service: 'python' }, - { method: 'POST', path: '/versions/{version_id}/reject', description: 'Version ablehnen', service: 'python' }, - { method: 'POST', path: '/versions/{version_id}/publish', description: 'Version veroeffentlichen', service: 'python' }, - { method: 'POST', path: '/versions/{version_id}/preview', description: 'Version-Vorschau generieren', service: 'python' }, - { method: 'POST', path: '/versions/{version_id}/send-test', description: 'Test-E-Mail senden', service: 'python' }, - { method: 'GET', path: '/default/{template_type}', description: 'Standard-Vorlage laden', service: 'python' }, - ], - }, - - { - id: 'escalations', - name: 'Eskalationen — Eskalationsmanagement', - service: 'python', - basePath: '/api/compliance/escalations', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/', description: 'Eskalationen auflisten', service: 'python' }, - { method: 'POST', path: '/', description: 'Eskalation erstellen', service: 'python' }, - { method: 'GET', path: '/stats', description: 'Eskalations-Statistiken laden', service: 'python' }, - { method: 'GET', path: '/{escalation_id}', description: 'Eskalation laden', service: 'python' }, - { method: 'PUT', path: '/{escalation_id}', description: 'Eskalation aktualisieren', service: 'python' }, - { method: 'PUT', path: '/{escalation_id}/status', description: 'Eskalations-Status aendern', service: 'python' }, - { method: 'DELETE', path: '/{escalation_id}', description: 'Eskalation loeschen', service: 'python' }, - ], - }, - - { - id: 'evidence', - name: 'Nachweise — Evidence Management', - service: 'python', - basePath: '/api/compliance/evidence', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/evidence', description: 'Nachweise auflisten', service: 'python' }, - { method: 'POST', path: '/evidence', description: 'Nachweis erstellen', service: 'python' }, - { method: 'DELETE', path: '/evidence/{evidence_id}', description: 'Nachweis loeschen', service: 'python' }, - { method: 'POST', path: '/evidence/upload', description: 'Nachweis-Datei hochladen', service: 'python' }, - { method: 'POST', path: '/evidence/collect', description: 'CI-Nachweis sammeln', service: 'python', exposure: 'partner' }, - { method: 'GET', path: '/evidence/ci-status', description: 'CI-Nachweis-Status laden', service: 'python', exposure: 'partner' }, - ], - }, - - { - id: 'extraction', - name: 'Extraktion — Anforderungen aus RAG', - service: 'python', - basePath: '/api/compliance', - exposure: 'internal', - endpoints: [ - { method: 'POST', path: '/extract-requirements-from-rag', description: 'Anforderungen aus RAG-Korpus extrahieren', service: 'python' }, - ], - }, - - { - id: 'generation', - name: 'Dokumentengenerierung — Automatische Erstellung', - service: 'python', - basePath: '/api/compliance/generation', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/preview/{doc_type}', description: 'Generierungs-Vorschau laden', service: 'python' }, - { method: 'POST', path: '/apply/{doc_type}', description: 'Dokument generieren und anwenden', service: 'python' }, - ], - }, - - { - id: 'import', - name: 'Dokument-Import & Gap-Analyse', - service: 'python', - basePath: '/api/import', - exposure: 'internal', - endpoints: [ - { method: 'POST', path: '/analyze', description: 'Dokument analysieren', service: 'python' }, - { method: 'GET', path: '/gap-analysis/{document_id}', description: 'Gap-Analyse laden', service: 'python' }, - { method: 'GET', path: '/documents', description: 'Importierte Dokumente auflisten', service: 'python' }, - { method: 'DELETE', path: '/{document_id}', description: 'Dokument loeschen', service: 'python' }, - ], - }, - - { - id: 'incidents', - name: 'Datenschutz-Vorfaelle — Incident Management', - service: 'python', - basePath: '/api/compliance/incidents', - exposure: 'internal', - endpoints: [ - { method: 'POST', path: '/', description: 'Vorfall erstellen', service: 'python' }, - { method: 'GET', path: '/', description: 'Vorfaelle auflisten', service: 'python' }, - { method: 'GET', path: '/stats', description: 'Vorfall-Statistiken laden', service: 'python' }, - { method: 'GET', path: '/{incident_id}', description: 'Vorfall laden', service: 'python' }, - { method: 'PUT', path: '/{incident_id}', description: 'Vorfall aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/{incident_id}', description: 'Vorfall loeschen', service: 'python' }, - { method: 'PUT', path: '/{incident_id}/status', description: 'Vorfall-Status aendern', service: 'python' }, - { method: 'POST', path: '/{incident_id}/assess-risk', description: 'Risikobewertung durchfuehren', service: 'python' }, - { method: 'POST', path: '/{incident_id}/notify-authority', description: 'Behoerde benachrichtigen', service: 'python' }, - { method: 'POST', path: '/{incident_id}/notify-subjects', description: 'Betroffene benachrichtigen', service: 'python' }, - { method: 'POST', path: '/{incident_id}/measures', description: 'Massnahme hinzufuegen', service: 'python' }, - { method: 'PUT', path: '/{incident_id}/measures/{measure_id}', description: 'Massnahme aktualisieren', service: 'python' }, - { method: 'POST', path: '/{incident_id}/measures/{measure_id}/complete', description: 'Massnahme abschliessen', service: 'python' }, - { method: 'POST', path: '/{incident_id}/timeline', description: 'Zeitachsen-Eintrag hinzufuegen', service: 'python' }, - { method: 'POST', path: '/{incident_id}/close', description: 'Vorfall schliessen', service: 'python' }, - ], - }, - - { - id: 'isms', - name: 'ISMS — ISO 27001 Managementsystem', - service: 'python', - basePath: '/api/compliance/isms', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/scope', description: 'ISMS-Scope laden', service: 'python' }, - { method: 'POST', path: '/scope', description: 'ISMS-Scope erstellen', service: 'python' }, - { method: 'PUT', path: '/scope/{scope_id}', description: 'ISMS-Scope aktualisieren', service: 'python' }, - { method: 'POST', path: '/scope/{scope_id}/approve', description: 'ISMS-Scope genehmigen', service: 'python' }, - { method: 'GET', path: '/context', description: 'ISMS-Kontext laden', service: 'python' }, - { method: 'POST', path: '/context', description: 'ISMS-Kontext erstellen', service: 'python' }, - { method: 'GET', path: '/policies', description: 'Richtlinien auflisten', service: 'python' }, - { method: 'POST', path: '/policies', description: 'Richtlinie erstellen', service: 'python' }, - { method: 'GET', path: '/policies/{policy_id}', description: 'Richtlinie laden', service: 'python' }, - { method: 'PUT', path: '/policies/{policy_id}', description: 'Richtlinie aktualisieren', service: 'python' }, - { method: 'POST', path: '/policies/{policy_id}/approve', description: 'Richtlinie genehmigen', service: 'python' }, - { method: 'GET', path: '/objectives', description: 'Sicherheitsziele laden', service: 'python' }, - { method: 'POST', path: '/objectives', description: 'Sicherheitsziel erstellen', service: 'python' }, - { method: 'PUT', path: '/objectives/{objective_id}', description: 'Sicherheitsziel aktualisieren', service: 'python' }, - { method: 'GET', path: '/soa', description: 'Statement of Applicability laden', service: 'python' }, - { method: 'POST', path: '/soa', description: 'SoA-Eintrag erstellen', service: 'python' }, - { method: 'PUT', path: '/soa/{entry_id}', description: 'SoA-Eintrag aktualisieren', service: 'python' }, - { method: 'POST', path: '/soa/{entry_id}/approve', description: 'SoA-Eintrag genehmigen', service: 'python' }, - { method: 'GET', path: '/findings', description: 'Audit-Feststellungen laden', service: 'python' }, - { method: 'POST', path: '/findings', description: 'Feststellung erstellen', service: 'python' }, - { method: 'PUT', path: '/findings/{finding_id}', description: 'Feststellung aktualisieren', service: 'python' }, - { method: 'POST', path: '/findings/{finding_id}/close', description: 'Feststellung schliessen', service: 'python' }, - { method: 'GET', path: '/capa', description: 'Korrekturmassnahmen laden', service: 'python' }, - { method: 'POST', path: '/capa', description: 'CAPA erstellen', service: 'python' }, - { method: 'PUT', path: '/capa/{capa_id}', description: 'CAPA aktualisieren', service: 'python' }, - { method: 'POST', path: '/capa/{capa_id}/verify', description: 'CAPA verifizieren', service: 'python' }, - { method: 'GET', path: '/management-reviews', description: 'Management-Reviews laden', service: 'python' }, - { method: 'POST', path: '/management-reviews', description: 'Review erstellen', service: 'python' }, - { method: 'GET', path: '/management-reviews/{review_id}', description: 'Review laden', service: 'python' }, - { method: 'PUT', path: '/management-reviews/{review_id}', description: 'Review aktualisieren', service: 'python' }, - { method: 'POST', path: '/management-reviews/{review_id}/approve', description: 'Review genehmigen', service: 'python' }, - { method: 'GET', path: '/internal-audits', description: 'Interne Audits laden', service: 'python' }, - { method: 'POST', path: '/internal-audits', description: 'Internes Audit erstellen', service: 'python' }, - { method: 'PUT', path: '/internal-audits/{audit_id}', description: 'Audit aktualisieren', service: 'python' }, - { method: 'POST', path: '/internal-audits/{audit_id}/complete', description: 'Audit abschliessen', service: 'python' }, - { method: 'POST', path: '/readiness-check', description: 'Bereitschafts-Check ausfuehren', service: 'python' }, - { method: 'GET', path: '/readiness-check/latest', description: 'Letzten Check laden', service: 'python' }, - { method: 'GET', path: '/audit-trail', description: 'Audit-Trail laden', service: 'python' }, - { method: 'GET', path: '/overview', description: 'ISO 27001 Uebersicht laden', service: 'python' }, - ], - }, - - { - id: 'legal-documents', - name: 'Rechtliche Dokumente — Verwaltung & Versionen', - service: 'python', - basePath: '/api/compliance/legal-documents', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/documents', description: 'Dokumente auflisten', service: 'python' }, - { method: 'POST', path: '/documents', description: 'Dokument erstellen', service: 'python' }, - { method: 'GET', path: '/documents/{document_id}', description: 'Dokument laden', service: 'python' }, - { method: 'DELETE', path: '/documents/{document_id}', description: 'Dokument loeschen', service: 'python' }, - { method: 'GET', path: '/documents/{document_id}/versions', description: 'Versionen laden', service: 'python' }, - { method: 'POST', path: '/versions', description: 'Version erstellen', service: 'python' }, - { method: 'PUT', path: '/versions/{version_id}', description: 'Version aktualisieren', service: 'python' }, - { method: 'GET', path: '/versions/{version_id}', description: 'Version laden', service: 'python' }, - { method: 'POST', path: '/versions/upload-word', description: 'Word-Dokument hochladen', service: 'python' }, - { method: 'POST', path: '/versions/{version_id}/submit-review', description: 'Zur Pruefung einreichen', service: 'python' }, - { method: 'POST', path: '/versions/{version_id}/approve', description: 'Version genehmigen', service: 'python' }, - { method: 'POST', path: '/versions/{version_id}/reject', description: 'Version ablehnen', service: 'python' }, - { method: 'POST', path: '/versions/{version_id}/publish', description: 'Version veroeffentlichen', service: 'python' }, - { method: 'GET', path: '/versions/{version_id}/approval-history', description: 'Genehmigungshistorie laden', service: 'python' }, - { method: 'GET', path: '/public', description: 'Oeffentliche Dokumente laden', service: 'python', exposure: 'public' }, - { method: 'GET', path: '/public/{document_type}/latest', description: 'Aktuellstes Dokument laden', service: 'python', exposure: 'public' }, - { method: 'POST', path: '/consents', description: 'Einwilligung erfassen', service: 'python' }, - { method: 'GET', path: '/consents/my', description: 'Eigene Einwilligungen laden', service: 'python' }, - { method: 'GET', path: '/consents/check/{document_type}', description: 'Einwilligungsstatus pruefen', service: 'python' }, - { method: 'DELETE', path: '/consents/{consent_id}', description: 'Einwilligung widerrufen', service: 'python' }, - { method: 'GET', path: '/stats/consents', description: 'Einwilligungs-Statistiken laden', service: 'python' }, - { method: 'GET', path: '/audit-log', description: 'Audit-Log laden', service: 'python' }, - { method: 'GET', path: '/cookie-categories', description: 'Cookie-Kategorien auflisten', service: 'python' }, - { method: 'POST', path: '/cookie-categories', description: 'Cookie-Kategorie erstellen', service: 'python' }, - { method: 'PUT', path: '/cookie-categories/{category_id}', description: 'Kategorie aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/cookie-categories/{category_id}', description: 'Kategorie loeschen', service: 'python' }, - ], - }, - - { - id: 'legal-templates', - name: 'Dokumentvorlagen — DSGVO-Generatoren', - service: 'python', - basePath: '/api/compliance/legal-templates', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/', description: 'Vorlagen auflisten', service: 'python' }, - { method: 'GET', path: '/status', description: 'Vorlagenstatus laden', service: 'python' }, - { method: 'GET', path: '/sources', description: 'Vorlagenquellen laden', service: 'python' }, - { method: 'GET', path: '/{template_id}', description: 'Vorlage laden', service: 'python' }, - { method: 'POST', path: '/', description: 'Vorlage erstellen', service: 'python' }, - { method: 'PUT', path: '/{template_id}', description: 'Vorlage aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/{template_id}', description: 'Vorlage loeschen', service: 'python' }, - ], - }, - - { - id: 'loeschfristen', - name: 'Loeschfristen — Aufbewahrung & Loeschung', - service: 'python', - basePath: '/api/compliance/loeschfristen', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/', description: 'Loeschrichtlinien auflisten', service: 'python' }, - { method: 'POST', path: '/', description: 'Richtlinie erstellen', service: 'python' }, - { method: 'GET', path: '/stats', description: 'Loeschfristen-Statistiken laden', service: 'python' }, - { method: 'GET', path: '/{policy_id}', description: 'Richtlinie laden', service: 'python' }, - { method: 'PUT', path: '/{policy_id}', description: 'Richtlinie aktualisieren', service: 'python' }, - { method: 'PUT', path: '/{policy_id}/status', description: 'Richtlinien-Status aendern', service: 'python' }, - { method: 'DELETE', path: '/{policy_id}', description: 'Richtlinie loeschen', service: 'python' }, - { method: 'GET', path: '/{policy_id}/versions', description: 'Versionshistorie laden', service: 'python' }, - { method: 'GET', path: '/{policy_id}/versions/{version_number}', description: 'Bestimmte Version laden', service: 'python' }, - ], - }, - - { - id: 'modules', - name: 'Module — Compliance-Modul-Verwaltung', - service: 'python', - basePath: '/api/compliance/modules', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/modules', description: 'Module auflisten', service: 'python' }, - { method: 'GET', path: '/modules/overview', description: 'Modul-Uebersicht laden', service: 'python' }, - { method: 'GET', path: '/modules/{module_id}', description: 'Modul laden', service: 'python' }, - { method: 'POST', path: '/modules/seed', description: 'Module einspielen', service: 'python', exposure: 'admin' }, - { method: 'POST', path: '/modules/{module_id}/activate', description: 'Modul aktivieren', service: 'python' }, - { method: 'POST', path: '/modules/{module_id}/deactivate', description: 'Modul deaktivieren', service: 'python' }, - { method: 'POST', path: '/modules/{module_id}/regulations', description: 'Regulierungs-Zuordnung hinzufuegen', service: 'python' }, - ], - }, - - { - id: 'notfallplan', - name: 'Notfallplan — Kontakte, Szenarien & Uebungen', - service: 'python', - basePath: '/api/compliance/notfallplan', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/contacts', description: 'Notfallkontakte laden', service: 'python' }, - { method: 'POST', path: '/contacts', description: 'Kontakt erstellen', service: 'python' }, - { method: 'PUT', path: '/contacts/{contact_id}', description: 'Kontakt aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/contacts/{contact_id}', description: 'Kontakt loeschen', service: 'python' }, - { method: 'GET', path: '/scenarios', description: 'Notfallszenarien laden', service: 'python' }, - { method: 'POST', path: '/scenarios', description: 'Szenario erstellen', service: 'python' }, - { method: 'PUT', path: '/scenarios/{scenario_id}', description: 'Szenario aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/scenarios/{scenario_id}', description: 'Szenario loeschen', service: 'python' }, - { method: 'GET', path: '/checklists', description: 'Checklisten laden', service: 'python' }, - { method: 'POST', path: '/checklists', description: 'Checkliste erstellen', service: 'python' }, - { method: 'PUT', path: '/checklists/{checklist_id}', description: 'Checkliste aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/checklists/{checklist_id}', description: 'Checkliste loeschen', service: 'python' }, - { method: 'GET', path: '/exercises', description: 'Uebungen laden', service: 'python' }, - { method: 'POST', path: '/exercises', description: 'Uebung erstellen', service: 'python' }, - { method: 'GET', path: '/incidents', description: 'Notfall-Vorfaelle laden', service: 'python' }, - { method: 'POST', path: '/incidents', description: 'Vorfall erstellen', service: 'python' }, - { method: 'PUT', path: '/incidents/{incident_id}', description: 'Vorfall aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/incidents/{incident_id}', description: 'Vorfall loeschen', service: 'python' }, - { method: 'GET', path: '/templates', description: 'Vorlagen laden', service: 'python' }, - { method: 'POST', path: '/templates', description: 'Vorlage erstellen', service: 'python' }, - { method: 'PUT', path: '/templates/{template_id}', description: 'Vorlage aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/templates/{template_id}', description: 'Vorlage loeschen', service: 'python' }, - { method: 'GET', path: '/stats', description: 'Notfallplan-Statistiken laden', service: 'python' }, - ], - }, - - { - id: 'obligations', - name: 'Pflichten — Compliance-Obligations', - service: 'python', - basePath: '/api/compliance/obligations', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/', description: 'Pflichten auflisten', service: 'python' }, - { method: 'POST', path: '/', description: 'Pflicht erstellen', service: 'python' }, - { method: 'GET', path: '/stats', description: 'Pflichten-Statistiken laden', service: 'python' }, - { method: 'GET', path: '/{obligation_id}', description: 'Pflicht laden', service: 'python' }, - { method: 'PUT', path: '/{obligation_id}', description: 'Pflicht aktualisieren', service: 'python' }, - { method: 'PUT', path: '/{obligation_id}/status', description: 'Pflicht-Status aendern', service: 'python' }, - { method: 'DELETE', path: '/{obligation_id}', description: 'Pflicht loeschen', service: 'python' }, - { method: 'GET', path: '/{obligation_id}/versions', description: 'Versionshistorie laden', service: 'python' }, - { method: 'GET', path: '/{obligation_id}/versions/{version_number}', description: 'Version laden', service: 'python' }, - ], - }, - - { - id: 'quality', - name: 'Quality — KI-Qualitaetsmetriken & Tests', - service: 'python', - basePath: '/api/compliance/quality', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/stats', description: 'Qualitaets-Statistiken laden', service: 'python' }, - { method: 'GET', path: '/metrics', description: 'Metriken auflisten', service: 'python' }, - { method: 'POST', path: '/metrics', description: 'Metrik erstellen', service: 'python' }, - { method: 'PUT', path: '/metrics/{metric_id}', description: 'Metrik aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/metrics/{metric_id}', description: 'Metrik loeschen', service: 'python' }, - { method: 'GET', path: '/tests', description: 'Tests auflisten', service: 'python' }, - { method: 'POST', path: '/tests', description: 'Test erstellen', service: 'python' }, - { method: 'PUT', path: '/tests/{test_id}', description: 'Test aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/tests/{test_id}', description: 'Test loeschen', service: 'python' }, - ], - }, - - { - id: 'risks', - name: 'Risikomanagement — Bewertung & Matrix', - service: 'python', - basePath: '/api/compliance/risks', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/risks', description: 'Risiken auflisten', service: 'python' }, - { method: 'POST', path: '/risks', description: 'Risiko erstellen', service: 'python' }, - { method: 'PUT', path: '/risks/{risk_id}', description: 'Risiko aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/risks/{risk_id}', description: 'Risiko loeschen', service: 'python' }, - { method: 'GET', path: '/risks/matrix', description: 'Risikomatrix laden', service: 'python' }, - ], - }, - - { - id: 'screening', - name: 'Screening — Abhaengigkeiten-Pruefung', - service: 'python', - basePath: '/api/compliance/screening', - exposure: 'internal', - endpoints: [ - { method: 'POST', path: '/scan', description: 'Abhaengigkeiten scannen', service: 'python', exposure: 'partner' }, - { method: 'GET', path: '/{screening_id}', description: 'Screening-Ergebnis laden', service: 'python' }, - { method: 'GET', path: '/', description: 'Screenings auflisten', service: 'python' }, - ], - }, - - { - id: 'scraper', - name: 'Scraper — Rechtsquellen-Aktualisierung', - service: 'python', - basePath: '/api/compliance/scraper', - exposure: 'partner', - endpoints: [ - { method: 'GET', path: '/scraper/status', description: 'Scraper-Status laden', service: 'python' }, - { method: 'GET', path: '/scraper/sources', description: 'Quellen auflisten', service: 'python' }, - { method: 'POST', path: '/scraper/scrape-all', description: 'Alle Quellen scrapen', service: 'python' }, - { method: 'POST', path: '/scraper/scrape/{code}', description: 'Einzelne Quelle scrapen', service: 'python' }, - { method: 'POST', path: '/scraper/extract-bsi', description: 'BSI-Anforderungen extrahieren', service: 'python' }, - { method: 'POST', path: '/scraper/extract-pdf', description: 'PDF-Anforderungen extrahieren', service: 'python' }, - { method: 'GET', path: '/scraper/pdf-documents', description: 'PDF-Dokumente auflisten', service: 'python' }, - ], - }, - - { - id: 'security-backlog', - name: 'Security Backlog — Sicherheitsmassnahmen', - service: 'python', - basePath: '/api/compliance/security-backlog', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/', description: 'Backlog-Eintraege auflisten', service: 'python' }, - { method: 'POST', path: '/', description: 'Eintrag erstellen', service: 'python' }, - { method: 'GET', path: '/stats', description: 'Backlog-Statistiken laden', service: 'python' }, - { method: 'PUT', path: '/{item_id}', description: 'Eintrag aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/{item_id}', description: 'Eintrag loeschen', service: 'python' }, - ], - }, - - { - id: 'source-policy', - name: 'Source Policy — Datenquellen & PII-Regeln', - service: 'python', - basePath: '/api/compliance/source-policy', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/sources', description: 'Datenquellen auflisten', service: 'python' }, - { method: 'POST', path: '/sources', description: 'Quelle erstellen', service: 'python' }, - { method: 'GET', path: '/sources/{source_id}', description: 'Quelle laden', service: 'python' }, - { method: 'PUT', path: '/sources/{source_id}', description: 'Quelle aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/sources/{source_id}', description: 'Quelle loeschen', service: 'python' }, - { method: 'GET', path: '/operations-matrix', description: 'Operationsmatrix laden', service: 'python' }, - { method: 'PUT', path: '/operations/{operation_id}', description: 'Operation aktualisieren', service: 'python' }, - { method: 'GET', path: '/pii-rules', description: 'PII-Regeln auflisten', service: 'python' }, - { method: 'POST', path: '/pii-rules', description: 'PII-Regel erstellen', service: 'python' }, - { method: 'PUT', path: '/pii-rules/{rule_id}', description: 'PII-Regel aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/pii-rules/{rule_id}', description: 'PII-Regel loeschen', service: 'python' }, - { method: 'GET', path: '/blocked-content', description: 'Gesperrte Inhalte laden', service: 'python' }, - { method: 'GET', path: '/policy-audit', description: 'Richtlinien-Audit-Log laden', service: 'python' }, - { method: 'GET', path: '/policy-stats', description: 'Richtlinien-Statistiken laden', service: 'python' }, - { method: 'GET', path: '/compliance-report', description: 'Compliance-Bericht laden', service: 'python' }, - ], - }, - - { - id: 'tom', - name: 'TOM — Technisch-Organisatorische Massnahmen', - service: 'python', - basePath: '/api/compliance/tom', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/state', description: 'TOM-Zustand laden', service: 'python' }, - { method: 'POST', path: '/state', description: 'TOM-Zustand speichern', service: 'python' }, - { method: 'DELETE', path: '/state', description: 'TOM-Zustand loeschen', service: 'python' }, - { method: 'GET', path: '/measures', description: 'Massnahmen auflisten', service: 'python' }, - { method: 'POST', path: '/measures', description: 'Massnahme erstellen', service: 'python' }, - { method: 'PUT', path: '/measures/{measure_id}', description: 'Massnahme aktualisieren', service: 'python' }, - { method: 'POST', path: '/measures/bulk', description: 'Massnahmen Bulk-Upsert', service: 'python' }, - { method: 'GET', path: '/stats', description: 'TOM-Statistiken laden', service: 'python' }, - { method: 'GET', path: '/export', description: 'Massnahmen exportieren', service: 'python' }, - { method: 'GET', path: '/measures/{measure_id}/versions', description: 'Versionshistorie laden', service: 'python' }, - { method: 'GET', path: '/measures/{measure_id}/versions/{version_number}', description: 'Version laden', service: 'python' }, - ], - }, - - { - id: 'vendor-compliance', - name: 'Vendor Compliance — Auftragsverarbeitung', - service: 'python', - basePath: '/api/compliance/vendors', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/vendors/stats', description: 'Anbieter-Statistiken laden', service: 'python' }, - { method: 'GET', path: '/vendors', description: 'Anbieter auflisten', service: 'python' }, - { method: 'GET', path: '/vendors/{vendor_id}', description: 'Anbieter laden', service: 'python' }, - { method: 'POST', path: '/vendors', description: 'Anbieter erstellen', service: 'python' }, - { method: 'PUT', path: '/vendors/{vendor_id}', description: 'Anbieter aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/vendors/{vendor_id}', description: 'Anbieter loeschen', service: 'python' }, - { method: 'PATCH', path: '/vendors/{vendor_id}/status', description: 'Anbieter-Status aendern', service: 'python' }, - { method: 'GET', path: '/contracts', description: 'Vertraege auflisten', service: 'python' }, - { method: 'GET', path: '/contracts/{contract_id}', description: 'Vertrag laden', service: 'python' }, - { method: 'POST', path: '/contracts', description: 'Vertrag erstellen', service: 'python' }, - { method: 'PUT', path: '/contracts/{contract_id}', description: 'Vertrag aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/contracts/{contract_id}', description: 'Vertrag loeschen', service: 'python' }, - { method: 'GET', path: '/findings', description: 'Feststellungen auflisten', service: 'python' }, - { method: 'GET', path: '/findings/{finding_id}', description: 'Feststellung laden', service: 'python' }, - { method: 'POST', path: '/findings', description: 'Feststellung erstellen', service: 'python' }, - { method: 'PUT', path: '/findings/{finding_id}', description: 'Feststellung aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/findings/{finding_id}', description: 'Feststellung loeschen', service: 'python' }, - { method: 'GET', path: '/control-instances', description: 'Kontroll-Instanzen auflisten', service: 'python' }, - { method: 'GET', path: '/control-instances/{instance_id}', description: 'Instanz laden', service: 'python' }, - { method: 'POST', path: '/control-instances', description: 'Instanz erstellen', service: 'python' }, - { method: 'PUT', path: '/control-instances/{instance_id}', description: 'Instanz aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/control-instances/{instance_id}', description: 'Instanz loeschen', service: 'python' }, - { method: 'GET', path: '/controls', description: 'Controls auflisten', service: 'python' }, - { method: 'POST', path: '/controls', description: 'Control erstellen', service: 'python' }, - { method: 'DELETE', path: '/controls/{control_id}', description: 'Control loeschen', service: 'python' }, - ], - }, - - { - id: 'vvt', - name: 'VVT — Verarbeitungsverzeichnis (Art. 30 DSGVO)', - service: 'python', - basePath: '/api/compliance/vvt', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/organization', description: 'Organisationskopf laden', service: 'python' }, - { method: 'PUT', path: '/organization', description: 'Organisationskopf speichern', service: 'python' }, - { method: 'GET', path: '/activities', description: 'Verarbeitungstaetigkeiten auflisten', service: 'python' }, - { method: 'POST', path: '/activities', description: 'Taetigkeit erstellen', service: 'python' }, - { method: 'GET', path: '/activities/{activity_id}', description: 'Taetigkeit laden', service: 'python' }, - { method: 'PUT', path: '/activities/{activity_id}', description: 'Taetigkeit aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/activities/{activity_id}', description: 'Taetigkeit loeschen', service: 'python' }, - { method: 'GET', path: '/audit-log', description: 'VVT-Audit-Log laden', service: 'python' }, - { method: 'GET', path: '/export', description: 'VVT exportieren', service: 'python' }, - { method: 'GET', path: '/stats', description: 'VVT-Statistiken laden', service: 'python' }, - { method: 'GET', path: '/activities/{activity_id}/versions', description: 'Versionshistorie laden', service: 'python' }, - { method: 'GET', path: '/activities/{activity_id}/versions/{version_number}', description: 'Version laden', service: 'python' }, - ], - }, - - { - id: 'consent-user', - name: 'Consent API — Nutzer-Einwilligungen', - service: 'python', - basePath: '/api/consents', - exposure: 'public', - endpoints: [ - { method: 'GET', path: '/token/demo', description: 'Demo-Token laden', service: 'python' }, - { method: 'GET', path: '/check/{document_type}', description: 'Einwilligungsstatus pruefen', service: 'python' }, - { method: 'GET', path: '/pending', description: 'Offene Einwilligungen laden', service: 'python' }, - { method: 'GET', path: '/documents/{document_type}/latest', description: 'Aktuellstes Dokument laden', service: 'python' }, - { method: 'POST', path: '/give', description: 'Einwilligung erteilen', service: 'python' }, - { method: 'GET', path: '/cookies/categories', description: 'Cookie-Kategorien laden', service: 'python' }, - { method: 'POST', path: '/cookies', description: 'Cookie-Einwilligung setzen', service: 'python' }, - { method: 'GET', path: '/privacy/my-data', description: 'Eigene Daten laden', service: 'python' }, - { method: 'POST', path: '/privacy/export', description: 'Datenexport anfordern', service: 'python' }, - { method: 'POST', path: '/privacy/delete', description: 'Datenlöschung anfordern', service: 'python' }, - { method: 'GET', path: '/health', description: 'Health-Check', service: 'python' }, - ], - }, - - { - id: 'consent-admin', - name: 'Consent Admin — Dokumenten- & Versionsverwaltung', - service: 'python', - basePath: '/api/admin/consents', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/documents', description: 'Dokumente auflisten', service: 'python' }, - { method: 'POST', path: '/documents', description: 'Dokument erstellen', service: 'python' }, - { method: 'PUT', path: '/documents/{doc_id}', description: 'Dokument aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/documents/{doc_id}', description: 'Dokument loeschen', service: 'python' }, - { method: 'GET', path: '/documents/{doc_id}/versions', description: 'Versionen laden', service: 'python' }, - { method: 'POST', path: '/versions', description: 'Version erstellen', service: 'python' }, - { method: 'PUT', path: '/versions/{version_id}', description: 'Version aktualisieren', service: 'python' }, - { method: 'POST', path: '/versions/{version_id}/publish', description: 'Version veroeffentlichen', service: 'python' }, - { method: 'POST', path: '/versions/{version_id}/archive', description: 'Version archivieren', service: 'python' }, - { method: 'DELETE', path: '/versions/{version_id}', description: 'Version loeschen', service: 'python' }, - { method: 'POST', path: '/versions/{version_id}/submit-review', description: 'Zur Pruefung einreichen', service: 'python' }, - { method: 'POST', path: '/versions/{version_id}/approve', description: 'Version genehmigen', service: 'python' }, - { method: 'POST', path: '/versions/{version_id}/reject', description: 'Version ablehnen', service: 'python' }, - { method: 'GET', path: '/versions/{version_id}/compare', description: 'Versionen vergleichen', service: 'python' }, - { method: 'GET', path: '/versions/{version_id}/approval-history', description: 'Genehmigungshistorie laden', service: 'python' }, - { method: 'POST', path: '/versions/upload-word', description: 'Word-Dokument hochladen', service: 'python' }, - { method: 'GET', path: '/scheduled-versions', description: 'Geplante Versionen laden', service: 'python' }, - { method: 'POST', path: '/scheduled-publishing/process', description: 'Geplante Veroeffentlichungen verarbeiten', service: 'python' }, - { method: 'GET', path: '/cookies/categories', description: 'Cookie-Kategorien laden', service: 'python' }, - { method: 'POST', path: '/cookies/categories', description: 'Kategorie erstellen', service: 'python' }, - { method: 'PUT', path: '/cookies/categories/{cat_id}', description: 'Kategorie aktualisieren', service: 'python' }, - { method: 'DELETE', path: '/cookies/categories/{cat_id}', description: 'Kategorie loeschen', service: 'python' }, - { method: 'GET', path: '/statistics', description: 'Admin-Statistiken laden', service: 'python' }, - { method: 'GET', path: '/audit-log', description: 'Audit-Log laden', service: 'python' }, - ], - }, - - { - id: 'dsr-user', - name: 'DSR API — Nutzer-Betroffenenrechte', - service: 'python', - basePath: '/api/dsr', - exposure: 'public', - endpoints: [ - { method: 'POST', path: '/', description: 'Antrag stellen', service: 'python' }, - { method: 'GET', path: '/', description: 'Eigene Antraege laden', service: 'python' }, - { method: 'GET', path: '/{dsr_id}', description: 'Antrag laden', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/cancel', description: 'Antrag stornieren', service: 'python' }, - ], - }, - - { - id: 'dsr-admin', - name: 'DSR Admin — Antrags-Verwaltung', - service: 'python', - basePath: '/api/admin/dsr', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/', description: 'Alle Antraege laden', service: 'python' }, - { method: 'GET', path: '/stats', description: 'DSR-Statistiken laden', service: 'python' }, - { method: 'GET', path: '/{dsr_id}', description: 'Antrag laden', service: 'python' }, - { method: 'POST', path: '/', description: 'Antrag erstellen', service: 'python' }, - { method: 'PUT', path: '/{dsr_id}', description: 'Antrag aktualisieren', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/status', description: 'Status aendern', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/verify-identity', description: 'Identitaet verifizieren', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/assign', description: 'Zuweisen', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/extend', description: 'Frist verlaengern', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/complete', description: 'Abschliessen', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/reject', description: 'Ablehnen', service: 'python' }, - { method: 'GET', path: '/{dsr_id}/history', description: 'Historie laden', service: 'python' }, - { method: 'GET', path: '/{dsr_id}/communications', description: 'Kommunikation laden', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/communicate', description: 'Nachricht senden', service: 'python' }, - { method: 'GET', path: '/{dsr_id}/exception-checks', description: 'Ausnahme-Checks laden', service: 'python' }, - { method: 'POST', path: '/{dsr_id}/exception-checks/init', description: 'Checks initialisieren', service: 'python' }, - { method: 'PUT', path: '/{dsr_id}/exception-checks/{check_id}', description: 'Check aktualisieren', service: 'python' }, - { method: 'POST', path: '/deadlines/process', description: 'Fristen verarbeiten', service: 'python' }, - ], - }, - - { - id: 'gdpr', - name: 'GDPR / Datenschutz — Nutzerdaten & Export', - service: 'python', - basePath: '/api/gdpr', - exposure: 'public', - endpoints: [ - { method: 'POST', path: '/export-pdf', description: 'Nutzerdaten als PDF exportieren', service: 'python' }, - { method: 'GET', path: '/export-html', description: 'Nutzerdaten als HTML exportieren', service: 'python' }, - { method: 'GET', path: '/data-categories', description: 'Datenkategorien laden', service: 'python' }, - { method: 'GET', path: '/data-categories/{category}', description: 'Kategorie-Details laden', service: 'python' }, - { method: 'POST', path: '/request-deletion', description: 'Datenlöschung beantragen', service: 'python' }, - ], - }, - - // ============================================================ - // GO / GIN BACKEND (ai-compliance-sdk, Port 8093) - // ============================================================ - - { - id: 'go-health', - name: 'Health — System-Status', - service: 'go', - basePath: '/sdk/v1', - exposure: 'admin', - endpoints: [ - { method: 'GET', path: '/health', description: 'API Health-Check', service: 'go', exposure: 'admin' }, - ], - }, - - { - id: 'rbac', - name: 'RBAC — Tenant, Rollen & Berechtigungen', - service: 'go', - basePath: '/sdk/v1', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/tenants', description: 'Alle Tenants auflisten', service: 'go' }, - { method: 'GET', path: '/tenants/:id', description: 'Tenant laden', service: 'go' }, - { method: 'POST', path: '/tenants', description: 'Tenant erstellen', service: 'go' }, - { method: 'PUT', path: '/tenants/:id', description: 'Tenant aktualisieren', service: 'go' }, - { method: 'GET', path: '/tenants/:id/namespaces', description: 'Namespaces auflisten', service: 'go' }, - { method: 'POST', path: '/tenants/:id/namespaces', description: 'Namespace erstellen', service: 'go' }, - { method: 'GET', path: '/namespaces/:id', description: 'Namespace laden', service: 'go' }, - { method: 'GET', path: '/roles', description: 'Rollen auflisten', service: 'go' }, - { method: 'GET', path: '/roles/system', description: 'System-Rollen auflisten', service: 'go' }, - { method: 'GET', path: '/roles/:id', description: 'Rolle laden', service: 'go' }, - { method: 'POST', path: '/roles', description: 'Rolle erstellen', service: 'go' }, - { method: 'POST', path: '/user-roles', description: 'Rolle zuweisen', service: 'go' }, - { method: 'DELETE', path: '/user-roles/:userId/:roleId', description: 'Rolle entziehen', service: 'go' }, - { method: 'GET', path: '/user-roles/:userId', description: 'Benutzer-Rollen laden', service: 'go' }, - { method: 'GET', path: '/permissions/effective', description: 'Effektive Berechtigungen laden', service: 'go' }, - { method: 'GET', path: '/permissions/context', description: 'Benutzerkontext laden', service: 'go' }, - { method: 'GET', path: '/permissions/check', description: 'Berechtigung pruefen', service: 'go' }, - ], - }, - - { - id: 'llm', - name: 'LLM — KI-Textverarbeitung & Policies', - service: 'go', - basePath: '/sdk/v1/llm', - exposure: 'partner', - endpoints: [ - { method: 'GET', path: '/policies', description: 'LLM-Policies auflisten', service: 'go' }, - { method: 'GET', path: '/policies/:id', description: 'Policy laden', service: 'go' }, - { method: 'POST', path: '/policies', description: 'Policy erstellen', service: 'go' }, - { method: 'PUT', path: '/policies/:id', description: 'Policy aktualisieren', service: 'go' }, - { method: 'DELETE', path: '/policies/:id', description: 'Policy loeschen', service: 'go' }, - { method: 'POST', path: '/chat', description: 'Chat Completion', service: 'go' }, - { method: 'POST', path: '/complete', description: 'Text Completion', service: 'go' }, - { method: 'GET', path: '/models', description: 'Verfuegbare Modelle auflisten', service: 'go' }, - { method: 'GET', path: '/providers/status', description: 'Provider-Status laden', service: 'go' }, - { method: 'POST', path: '/analyze', description: 'Text analysieren', service: 'go' }, - { method: 'POST', path: '/redact', description: 'PII schwärzen', service: 'go' }, - ], - }, - - { - id: 'go-audit', - name: 'Audit (Go) — LLM-Audit & Compliance-Reports', - service: 'go', - basePath: '/sdk/v1/audit', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/llm', description: 'LLM-Audit-Logs laden', service: 'go' }, - { method: 'GET', path: '/general', description: 'Allgemeine Audit-Logs laden', service: 'go' }, - { method: 'GET', path: '/llm-operations', description: 'LLM-Operationen laden (Alias)', service: 'go' }, - { method: 'GET', path: '/trail', description: 'Audit-Trail laden (Alias)', service: 'go' }, - { method: 'GET', path: '/usage', description: 'Nutzungsstatistiken laden', service: 'go' }, - { method: 'GET', path: '/compliance-report', description: 'Compliance-Report laden', service: 'go' }, - { method: 'GET', path: '/export/llm', description: 'LLM-Audit exportieren', service: 'go' }, - { method: 'GET', path: '/export/general', description: 'Allgemeines Audit exportieren', service: 'go' }, - { method: 'GET', path: '/export/compliance', description: 'Compliance-Report exportieren', service: 'go' }, - ], - }, - - { - id: 'ucca', - name: 'UCCA — Use-Case Compliance Advisor', - service: 'go', - basePath: '/sdk/v1/ucca', - exposure: 'internal', - endpoints: [ - { method: 'POST', path: '/assess', description: 'Compliance-Bewertung durchfuehren', service: 'go' }, - { method: 'GET', path: '/assessments', description: 'Bewertungen auflisten', service: 'go' }, - { method: 'GET', path: '/assessments/:id', description: 'Bewertung laden', service: 'go' }, - { method: 'PUT', path: '/assessments/:id', description: 'Bewertung aktualisieren', service: 'go' }, - { method: 'DELETE', path: '/assessments/:id', description: 'Bewertung loeschen', service: 'go' }, - { method: 'POST', path: '/assessments/:id/explain', description: 'KI-Erklaerung generieren', service: 'go' }, - { method: 'GET', path: '/patterns', description: 'Compliance-Muster laden', service: 'go' }, - { method: 'GET', path: '/examples', description: 'Beispiele laden', service: 'go' }, - { method: 'GET', path: '/rules', description: 'Compliance-Regeln laden', service: 'go' }, - { method: 'GET', path: '/controls', description: 'Controls laden', service: 'go' }, - { method: 'GET', path: '/problem-solutions', description: 'Problem-Loesungs-Paare laden', service: 'go' }, - { method: 'GET', path: '/export/:id', description: 'Bewertung exportieren', service: 'go' }, - { method: 'GET', path: '/escalations', description: 'Eskalationen auflisten', service: 'go' }, - { method: 'GET', path: '/escalations/stats', description: 'Eskalations-Statistiken laden', service: 'go' }, - { method: 'GET', path: '/escalations/:id', description: 'Eskalation laden', service: 'go' }, - { method: 'POST', path: '/escalations', description: 'Eskalation erstellen', service: 'go' }, - { method: 'POST', path: '/escalations/:id/assign', description: 'Eskalation zuweisen', service: 'go' }, - { method: 'POST', path: '/escalations/:id/review', description: 'Review starten', service: 'go' }, - { method: 'POST', path: '/escalations/:id/decide', description: 'Entscheidung treffen', service: 'go' }, - { method: 'POST', path: '/obligations/assess', description: 'Pflichten bewerten', service: 'go' }, - { method: 'GET', path: '/obligations/:assessmentId', description: 'Bewertungsergebnis laden', service: 'go' }, - { method: 'GET', path: '/obligations/:assessmentId/by-regulation', description: 'Nach Regulierung gruppiert', service: 'go' }, - { method: 'GET', path: '/obligations/:assessmentId/by-deadline', description: 'Nach Frist gruppiert', service: 'go' }, - { method: 'GET', path: '/obligations/:assessmentId/by-responsible', description: 'Nach Verantwortlichem gruppiert', service: 'go' }, - { method: 'POST', path: '/obligations/export/memo', description: 'C-Level-Memo exportieren', service: 'go' }, - { method: 'POST', path: '/obligations/export/direct', description: 'Uebersicht direkt exportieren', service: 'go' }, - { method: 'GET', path: '/obligations/regulations', description: 'Regulierungen laden', service: 'go' }, - { method: 'GET', path: '/obligations/regulations/:regulationId/decision-tree', description: 'Entscheidungsbaum laden', service: 'go' }, - { method: 'POST', path: '/obligations/quick-check', description: 'Schnell-Check durchfuehren', service: 'go' }, - { method: 'POST', path: '/obligations/assess-from-scope', description: 'Aus Scope bewerten', service: 'go' }, - { method: 'GET', path: '/obligations/tom-controls/for-obligation/:obligationId', description: 'TOM-Controls fuer Pflicht laden', service: 'go' }, - { method: 'POST', path: '/obligations/gap-analysis', description: 'TOM-Gap-Analyse durchfuehren', service: 'go' }, - { method: 'GET', path: '/obligations/tom-controls/:controlId/obligations', description: 'Pflichten fuer TOM-Control laden', service: 'go' }, - ], - }, - - { - id: 'rag', - name: 'RAG — Legal Corpus & Vektorsuche', - service: 'go', - basePath: '/sdk/v1/rag', - exposure: 'partner', - endpoints: [ - { method: 'POST', path: '/search', description: 'Rechtskorpus durchsuchen', service: 'go' }, - { method: 'GET', path: '/regulations', description: 'Regulierungen auflisten', service: 'go' }, - { method: 'GET', path: '/corpus-status', description: 'Indexierungsstatus laden', service: 'go' }, - { method: 'GET', path: '/corpus-versions/:collection', description: 'Versionshistorie laden', service: 'go' }, - ], - }, - - { - id: 'roadmaps', - name: 'Roadmaps — Compliance-Implementierungsplaene', - service: 'go', - basePath: '/sdk/v1/roadmaps', - exposure: 'internal', - endpoints: [ - { method: 'POST', path: '/', description: 'Roadmap erstellen', service: 'go' }, - { method: 'GET', path: '/', description: 'Roadmaps auflisten', service: 'go' }, - { method: 'GET', path: '/:id', description: 'Roadmap laden', service: 'go' }, - { method: 'PUT', path: '/:id', description: 'Roadmap aktualisieren', service: 'go' }, - { method: 'DELETE', path: '/:id', description: 'Roadmap loeschen', service: 'go' }, - { method: 'GET', path: '/:id/stats', description: 'Roadmap-Statistiken laden', service: 'go' }, - { method: 'POST', path: '/:id/items', description: 'Item erstellen', service: 'go' }, - { method: 'GET', path: '/:id/items', description: 'Items auflisten', service: 'go' }, - { method: 'POST', path: '/import/upload', description: 'Import hochladen', service: 'go' }, - { method: 'GET', path: '/import/:jobId', description: 'Import-Status laden', service: 'go' }, - { method: 'POST', path: '/import/:jobId/confirm', description: 'Import bestaetigen', service: 'go' }, - ], - }, - - { - id: 'roadmap-items', - name: 'Roadmap Items — Einzelne Massnahmen', - service: 'go', - basePath: '/sdk/v1/roadmap-items', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/:id', description: 'Item laden', service: 'go' }, - { method: 'PUT', path: '/:id', description: 'Item aktualisieren', service: 'go' }, - { method: 'PATCH', path: '/:id/status', description: 'Item-Status aendern', service: 'go' }, - { method: 'DELETE', path: '/:id', description: 'Item loeschen', service: 'go' }, - ], - }, - - { - id: 'workshops', - name: 'Workshops — Kollaborative Compliance-Workshops', - service: 'go', - basePath: '/sdk/v1/workshops', - exposure: 'internal', - endpoints: [ - { method: 'POST', path: '/', description: 'Workshop erstellen', service: 'go' }, - { method: 'GET', path: '/', description: 'Workshops auflisten', service: 'go' }, - { method: 'GET', path: '/:id', description: 'Workshop laden', service: 'go' }, - { method: 'PUT', path: '/:id', description: 'Workshop aktualisieren', service: 'go' }, - { method: 'DELETE', path: '/:id', description: 'Workshop loeschen', service: 'go' }, - { method: 'POST', path: '/:id/start', description: 'Workshop starten', service: 'go' }, - { method: 'POST', path: '/:id/pause', description: 'Workshop pausieren', service: 'go' }, - { method: 'POST', path: '/:id/complete', description: 'Workshop abschliessen', service: 'go' }, - { method: 'GET', path: '/:id/participants', description: 'Teilnehmer auflisten', service: 'go' }, - { method: 'PUT', path: '/:id/participants/:participantId', description: 'Teilnehmer aktualisieren', service: 'go' }, - { method: 'DELETE', path: '/:id/participants/:participantId', description: 'Teilnehmer entfernen', service: 'go' }, - { method: 'POST', path: '/:id/responses', description: 'Antwort einreichen', service: 'go' }, - { method: 'GET', path: '/:id/responses', description: 'Antworten laden', service: 'go' }, - { method: 'POST', path: '/:id/comments', description: 'Kommentar hinzufuegen', service: 'go' }, - { method: 'GET', path: '/:id/comments', description: 'Kommentare laden', service: 'go' }, - { method: 'POST', path: '/:id/advance', description: 'Zum naechsten Schritt', service: 'go' }, - { method: 'POST', path: '/:id/goto', description: 'Zu bestimmtem Schritt springen', service: 'go' }, - { method: 'GET', path: '/:id/stats', description: 'Workshop-Statistiken laden', service: 'go' }, - { method: 'GET', path: '/:id/summary', description: 'Zusammenfassung laden', service: 'go' }, - { method: 'GET', path: '/:id/export', description: 'Workshop exportieren', service: 'go' }, - { method: 'POST', path: '/join/:code', description: 'Per Zugangscode beitreten', service: 'go' }, - ], - }, - - { - id: 'portfolios', - name: 'Portfolios — KI-Use-Case-Portfolio', - service: 'go', - basePath: '/sdk/v1/portfolios', - exposure: 'internal', - endpoints: [ - { method: 'POST', path: '/', description: 'Portfolio erstellen', service: 'go' }, - { method: 'GET', path: '/', description: 'Portfolios auflisten', service: 'go' }, - { method: 'GET', path: '/:id', description: 'Portfolio laden', service: 'go' }, - { method: 'PUT', path: '/:id', description: 'Portfolio aktualisieren', service: 'go' }, - { method: 'DELETE', path: '/:id', description: 'Portfolio loeschen', service: 'go' }, - { method: 'POST', path: '/:id/items', description: 'Item hinzufuegen', service: 'go' }, - { method: 'GET', path: '/:id/items', description: 'Items auflisten', service: 'go' }, - { method: 'POST', path: '/:id/items/bulk', description: 'Items Bulk-Import', service: 'go' }, - { method: 'DELETE', path: '/:id/items/:itemId', description: 'Item entfernen', service: 'go' }, - { method: 'PUT', path: '/:id/items/order', description: 'Items sortieren', service: 'go' }, - { method: 'GET', path: '/:id/stats', description: 'Portfolio-Statistiken laden', service: 'go' }, - { method: 'GET', path: '/:id/activity', description: 'Aktivitaets-Log laden', service: 'go' }, - { method: 'POST', path: '/:id/recalculate', description: 'Metriken neu berechnen', service: 'go' }, - { method: 'POST', path: '/:id/submit-review', description: 'Zur Pruefung einreichen', service: 'go' }, - { method: 'POST', path: '/:id/approve', description: 'Portfolio genehmigen', service: 'go' }, - { method: 'POST', path: '/merge', description: 'Portfolios zusammenfuehren', service: 'go' }, - { method: 'POST', path: '/compare', description: 'Portfolios vergleichen', service: 'go' }, - ], - }, - - { - id: 'academy', - name: 'Academy — E-Learning & Zertifikate', - service: 'go', - basePath: '/sdk/v1/academy', - exposure: 'internal', - endpoints: [ - { method: 'POST', path: '/courses', description: 'Kurs erstellen', service: 'go' }, - { method: 'GET', path: '/courses', description: 'Kurse auflisten', service: 'go' }, - { method: 'GET', path: '/courses/:id', description: 'Kurs laden', service: 'go' }, - { method: 'PUT', path: '/courses/:id', description: 'Kurs aktualisieren', service: 'go' }, - { method: 'DELETE', path: '/courses/:id', description: 'Kurs loeschen', service: 'go' }, - { method: 'POST', path: '/enrollments', description: 'Einschreibung erstellen', service: 'go' }, - { method: 'GET', path: '/enrollments', description: 'Einschreibungen auflisten', service: 'go' }, - { method: 'PUT', path: '/enrollments/:id/progress', description: 'Fortschritt aktualisieren', service: 'go' }, - { method: 'POST', path: '/enrollments/:id/complete', description: 'Einschreibung abschliessen', service: 'go' }, - { method: 'GET', path: '/certificates/:id', description: 'Zertifikat laden', service: 'go' }, - { method: 'POST', path: '/enrollments/:id/certificate', description: 'Zertifikat generieren', service: 'go' }, - { method: 'GET', path: '/certificates/:id/pdf', description: 'Zertifikat-PDF herunterladen', service: 'go' }, - { method: 'POST', path: '/courses/:id/quiz', description: 'Quiz einreichen', service: 'go' }, - { method: 'PUT', path: '/lessons/:id', description: 'Lektion aktualisieren', service: 'go' }, - { method: 'POST', path: '/lessons/:id/quiz-test', description: 'Quiz testen', service: 'go' }, - { method: 'GET', path: '/stats', description: 'Academy-Statistiken laden', service: 'go' }, - { method: 'POST', path: '/courses/generate', description: 'Kurs aus Modul generieren', service: 'go' }, - { method: 'POST', path: '/courses/generate-all', description: 'Alle Kurse generieren', service: 'go' }, - ], - }, - - { - id: 'training', - name: 'Training — Schulungsmodule & Content-Pipeline', - service: 'go', - basePath: '/sdk/v1/training', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/modules', description: 'Schulungsmodule auflisten', service: 'go' }, - { method: 'GET', path: '/modules/:id', description: 'Modul laden', service: 'go' }, - { method: 'POST', path: '/modules', description: 'Modul erstellen', service: 'go' }, - { method: 'PUT', path: '/modules/:id', description: 'Modul aktualisieren', service: 'go' }, - { method: 'GET', path: '/matrix', description: 'Schulungsmatrix laden', service: 'go' }, - { method: 'GET', path: '/matrix/:role', description: 'Matrix fuer Rolle laden', service: 'go' }, - { method: 'POST', path: '/matrix', description: 'Matrix-Eintrag setzen', service: 'go' }, - { method: 'DELETE', path: '/matrix/:role/:moduleId', description: 'Matrix-Eintrag loeschen', service: 'go' }, - { method: 'POST', path: '/assignments/compute', description: 'Zuweisungen berechnen', service: 'go' }, - { method: 'GET', path: '/assignments', description: 'Zuweisungen auflisten', service: 'go' }, - { method: 'GET', path: '/assignments/:id', description: 'Zuweisung laden', service: 'go' }, - { method: 'POST', path: '/assignments/:id/start', description: 'Zuweisung starten', service: 'go' }, - { method: 'POST', path: '/assignments/:id/progress', description: 'Fortschritt aktualisieren', service: 'go' }, - { method: 'POST', path: '/assignments/:id/complete', description: 'Zuweisung abschliessen', service: 'go' }, - { method: 'GET', path: '/quiz/:moduleId', description: 'Quiz laden', service: 'go' }, - { method: 'POST', path: '/quiz/:moduleId/submit', description: 'Quiz einreichen', service: 'go' }, - { method: 'GET', path: '/quiz/attempts/:assignmentId', description: 'Quiz-Versuche laden', service: 'go' }, - { method: 'POST', path: '/content/generate', description: 'Inhalt generieren', service: 'go' }, - { method: 'POST', path: '/content/generate-quiz', description: 'Quiz generieren', service: 'go' }, - { method: 'POST', path: '/content/generate-all', description: 'Alle Inhalte generieren', service: 'go' }, - { method: 'POST', path: '/content/generate-all-quiz', description: 'Alle Quizze generieren', service: 'go' }, - { method: 'GET', path: '/content/:moduleId', description: 'Modul-Inhalt laden', service: 'go' }, - { method: 'POST', path: '/content/:moduleId/publish', description: 'Inhalt veroeffentlichen', service: 'go' }, - { method: 'POST', path: '/content/:moduleId/generate-audio', description: 'Audio generieren', service: 'go' }, - { method: 'POST', path: '/content/:moduleId/generate-video', description: 'Video generieren', service: 'go' }, - { method: 'POST', path: '/content/:moduleId/preview-script', description: 'Video-Script Vorschau', service: 'go' }, - { method: 'GET', path: '/media/module/:moduleId', description: 'Medien fuer Modul laden', service: 'go' }, - { method: 'GET', path: '/media/:mediaId/url', description: 'Medien-URL laden', service: 'go' }, - { method: 'POST', path: '/media/:mediaId/publish', description: 'Medium veroeffentlichen', service: 'go' }, - { method: 'GET', path: '/deadlines', description: 'Fristen laden', service: 'go' }, - { method: 'GET', path: '/deadlines/overdue', description: 'Ueberfaellige Fristen laden', service: 'go' }, - { method: 'POST', path: '/escalation/check', description: 'Eskalation pruefen', service: 'go' }, - { method: 'GET', path: '/audit-log', description: 'Schulungs-Audit-Log laden', service: 'go' }, - { method: 'GET', path: '/stats', description: 'Schulungs-Statistiken laden', service: 'go' }, - { method: 'GET', path: '/certificates/:id/verify', description: 'Zertifikat verifizieren', service: 'go', exposure: 'partner' }, - ], - }, - - { - id: 'whistleblower', - name: 'Whistleblower — Hinweisgebersystem (HinSchG)', - service: 'go', - basePath: '/sdk/v1/whistleblower', - exposure: 'internal', - endpoints: [ - { method: 'POST', path: '/reports/submit', description: 'Anonymen Hinweis einreichen', service: 'go', exposure: 'public' }, - { method: 'GET', path: '/reports/access/:accessKey', description: 'Hinweis per Zugangscode laden', service: 'go', exposure: 'public' }, - { method: 'POST', path: '/reports/access/:accessKey/messages', description: 'Nachricht senden (anonym)', service: 'go', exposure: 'public' }, - { method: 'GET', path: '/reports', description: 'Alle Hinweise auflisten', service: 'go' }, - { method: 'GET', path: '/reports/:id', description: 'Hinweis laden', service: 'go' }, - { method: 'PUT', path: '/reports/:id', description: 'Hinweis aktualisieren', service: 'go' }, - { method: 'DELETE', path: '/reports/:id', description: 'Hinweis loeschen', service: 'go' }, - { method: 'POST', path: '/reports/:id/acknowledge', description: 'Eingangsbestaetigung senden', service: 'go' }, - { method: 'POST', path: '/reports/:id/investigate', description: 'Untersuchung starten', service: 'go' }, - { method: 'POST', path: '/reports/:id/measures', description: 'Abhilfemassnahme hinzufuegen', service: 'go' }, - { method: 'POST', path: '/reports/:id/close', description: 'Hinweis schliessen', service: 'go' }, - { method: 'POST', path: '/reports/:id/messages', description: 'Admin-Nachricht senden', service: 'go' }, - { method: 'GET', path: '/reports/:id/messages', description: 'Nachrichten laden', service: 'go' }, - { method: 'GET', path: '/stats', description: 'Whistleblower-Statistiken laden', service: 'go' }, - ], - }, - - { - id: 'iace', - name: 'IACE — Industrial AI / CE-Compliance Engine', - service: 'go', - basePath: '/sdk/v1/iace', - exposure: 'internal', - endpoints: [ - { method: 'GET', path: '/hazard-library', description: 'Gefahrenbibliothek laden', service: 'go' }, - { method: 'GET', path: '/controls-library', description: 'Controls-Bibliothek laden', service: 'go' }, - { method: 'POST', path: '/projects', description: 'Projekt erstellen', service: 'go' }, - { method: 'GET', path: '/projects', description: 'Projekte auflisten', service: 'go' }, - { method: 'GET', path: '/projects/:id', description: 'Projekt laden', service: 'go' }, - { method: 'PUT', path: '/projects/:id', description: 'Projekt aktualisieren', service: 'go' }, - { method: 'DELETE', path: '/projects/:id', description: 'Projekt archivieren', service: 'go' }, - { method: 'POST', path: '/projects/:id/init-from-profile', description: 'Aus Unternehmensprofil initialisieren', service: 'go' }, - { method: 'POST', path: '/projects/:id/completeness-check', description: 'Vollstaendigkeits-Check durchfuehren', service: 'go' }, - { method: 'POST', path: '/projects/:id/components', description: 'Komponente erstellen', service: 'go' }, - { method: 'GET', path: '/projects/:id/components', description: 'Komponenten auflisten', service: 'go' }, - { method: 'PUT', path: '/projects/:id/components/:cid', description: 'Komponente aktualisieren', service: 'go' }, - { method: 'DELETE', path: '/projects/:id/components/:cid', description: 'Komponente loeschen', service: 'go' }, - { method: 'POST', path: '/projects/:id/classify', description: 'Regulatorisch klassifizieren', service: 'go' }, - { method: 'GET', path: '/projects/:id/classifications', description: 'Klassifizierungen laden', service: 'go' }, - { method: 'POST', path: '/projects/:id/classify/:regulation', description: 'Fuer einzelne Regulierung klassifizieren', service: 'go' }, - { method: 'POST', path: '/projects/:id/hazards', description: 'Gefaehrdung erstellen', service: 'go' }, - { method: 'GET', path: '/projects/:id/hazards', description: 'Gefaehrdungen auflisten', service: 'go' }, - { method: 'PUT', path: '/projects/:id/hazards/:hid', description: 'Gefaehrdung aktualisieren', service: 'go' }, - { method: 'POST', path: '/projects/:id/hazards/suggest', description: 'KI-Gefaehrdungsvorschlaege generieren', service: 'go' }, - { method: 'POST', path: '/projects/:id/hazards/:hid/assess', description: 'Risiko bewerten', service: 'go' }, - { method: 'GET', path: '/projects/:id/risk-summary', description: 'Risiko-Zusammenfassung laden', service: 'go' }, - { method: 'POST', path: '/projects/:id/hazards/:hid/reassess', description: 'Risiko neu bewerten', service: 'go' }, - { method: 'POST', path: '/projects/:id/hazards/:hid/mitigations', description: 'Risikominderung erstellen', service: 'go' }, - { method: 'PUT', path: '/mitigations/:mid', description: 'Risikominderung aktualisieren', service: 'go' }, - { method: 'POST', path: '/mitigations/:mid/verify', description: 'Risikominderung verifizieren', service: 'go' }, - { method: 'POST', path: '/projects/:id/evidence', description: 'Nachweis hochladen', service: 'go' }, - { method: 'GET', path: '/projects/:id/evidence', description: 'Nachweise auflisten', service: 'go' }, - { method: 'POST', path: '/projects/:id/verification-plan', description: 'Verifizierungsplan erstellen', service: 'go' }, - { method: 'PUT', path: '/verification-plan/:vid', description: 'Plan aktualisieren', service: 'go' }, - { method: 'POST', path: '/verification-plan/:vid/complete', description: 'Verifizierung abschliessen', service: 'go' }, - { method: 'POST', path: '/projects/:id/tech-file/generate', description: 'Technische Akte generieren', service: 'go' }, - { method: 'GET', path: '/projects/:id/tech-file', description: 'Akte-Abschnitte laden', service: 'go' }, - { method: 'PUT', path: '/projects/:id/tech-file/:section', description: 'Abschnitt aktualisieren', service: 'go' }, - { method: 'POST', path: '/projects/:id/tech-file/:section/approve', description: 'Abschnitt genehmigen', service: 'go' }, - { method: 'GET', path: '/projects/:id/tech-file/export', description: 'Technische Akte exportieren', service: 'go' }, - { method: 'POST', path: '/projects/:id/monitoring', description: 'Monitoring-Event erstellen', service: 'go' }, - { method: 'GET', path: '/projects/:id/monitoring', description: 'Monitoring-Events laden', service: 'go' }, - { method: 'PUT', path: '/projects/:id/monitoring/:eid', description: 'Event aktualisieren', service: 'go' }, - { method: 'GET', path: '/projects/:id/audit-trail', description: 'Projekt-Audit-Trail laden', service: 'go' }, - ], - }, + ...pythonCoreModules, + ...pythonGdprModules, + ...pythonOpsModules, + ...goModules, ]