/**
 * Database utilities for The Order
 */

export * from './client';
export * from './schema';
export * from './credential-lifecycle';
export * from './query-cache';
export * from './eresidency-applications';
export * from './document-versions';
export * from './legal-matters';
export * from './document-comments';
export * from './document-workflows';
export * from './court-filings';
export * from './clause-library';
export * from './document-checkout';
export * from './document-retention';
export * from './document-search';

// Export credential templates (excluding createTemplateVersion to avoid conflict)
export {
  getCredentialTemplateByName,
  renderCredentialFromTemplate,
  createCredentialTemplate,
  getCredentialTemplate,
  updateCredentialTemplate,
  listCredentialTemplates,
  CredentialTemplateSchema,
  type CredentialTemplate,
} from './credential-templates';

// Export document templates (with createTemplateVersion)
export * from './document-templates';

// Export audit search (excluding getAuditStatistics to avoid conflict)
export {
  searchAuditLogs,
  type AuditSearchFilters,
  type AuditSearchResult,
} from './audit-search';

// Export document audit (with getAuditStatistics)
export * from './document-audit';

// Re-export query types
export type { QueryResult, QueryResultRow } from './client';

// Re-export types for convenience
export type {
  User,
  Document,
  Deal,
  VerifiableCredential,
  Signature,
  LedgerEntry,
  Payment,
} from './schema';

