Skip to main content

datasynth_group/
lib.rs

1//! DataSynth group audit simulation engine.
2//!
3//! Manifest / shard / aggregate three-phase model layered above
4//! [`datasynth_runtime::EnhancedOrchestrator`]. See
5//! `docs/superpowers/specs/2026-04-23-group-audit-simulation-design.md`.
6
7pub mod aggregate;
8pub mod config;
9pub mod errors;
10pub mod manifest;
11pub mod resolve;
12pub mod shard;
13pub mod standalone;
14pub mod validate;
15
16pub use aggregate::{
17    aggregate_pre_elimination, apply_eliminations_to_tb, apply_nci_and_equity_method,
18    build_consolidated_balance_sheet, build_consolidated_balance_sheet_with_names,
19    build_consolidated_cash_flow, build_consolidated_income_statement,
20    build_consolidated_income_statement_with_names, build_consolidation_schedule,
21    build_coverage_report, build_notes_to_consolidated_fs, build_statement_of_changes_in_equity,
22    classify_account, compute_cta, compute_equity_method_investment, compute_nci_rollforward,
23    cta_rollforward, eliminations_to_journal_entries, extract_opening_balances,
24    generate_eliminations, ingest_opening_equity_method_carrying_values,
25    ingest_opening_nci_balances, ingest_opening_suppressed_losses, load_entity_trial_balance,
26    match_ic_pairs, read_prior_period_closing_tbs, run_aggregate, run_aggregate_chain,
27    run_cgu_impairment_tests, select_restatement_path, translate_entity_tb,
28    translate_entity_tb_with_hyperinflation, translate_entity_tb_with_indexed_restatement,
29    write_cgu_impairment_tests, write_consolidated_fs, write_coverage_report,
30    write_cta_rollforward, write_equity_method_investments, write_nci_rollforward,
31    write_suppressed_losses, write_translation_worksheet, AccountNameDictionary, AggregateOptions,
32    AggregateSummary, AggregatedAccount, AggregatedTb, BsLine, CashFlowInputs, CfLine, CfSection,
33    CguTestInputs, ConsolidatedBalanceSheet, ConsolidatedCashFlow, ConsolidatedFinancialStatements,
34    ConsolidatedIncomeStatement, ConsolidationSchedule, CoverageReport, CtaRollforward,
35    DeferredEntity, DrCr, EliminationResult, EquityChangesInputs, EquityMethodInputs,
36    EquityMethodInvestment, EquityRollforward, IcMatchResult, IcMatchedPair, IndexedRestatement,
37    IsLine, NciInputs, NciRollforward, Note, NotesInputs, NotesToConsolidatedFs, OpeningBalance,
38    PeriodSpec, RateBasis, RestatementPath, ScheduleLine, StatementOfChangesInEquity,
39    TranslatedLine, TranslatedTb, TranslationAccountType, UnmatchedReason, UnmatchedSide,
40    WorksheetEntity, WorksheetLine, CGU_IMPAIRMENT_TESTS_FILENAME, CONSOLIDATED_FS_FILENAME,
41    CONSOLIDATED_SUBDIR, CONSOLIDATION_SCHEDULE_FILENAME, COVERAGE_REPORT_FILENAME,
42    COVERAGE_REPORT_SUBDIR, CTA_ROLLFORWARD_FILENAME, EQUITY_METHOD_INVESTMENTS_FILENAME,
43    NCI_ROLLFORWARD_FILENAME, NOTES_FILENAME, TRANSLATION_WORKSHEET_FILENAME, UNMATCHED_SAMPLE_CAP,
44};
45pub use config::{
46    AuditEngagementConfig, CbcReportConfig, CguConfig, CguDefinitionEntry,
47    CguGoodwillAllocationEntry, ComponentScopeThresholds, ConsolidationMethod, EntityConfig,
48    FleetConfig, FxConfig, FxPolicyConfig, FxRateBasis, FxRateSource, GeneratedEntityBlock,
49    GroupConfig, GroupMaterialityConfig, IcMatchingConfig, IcMatchingStrategy, IcPattern,
50    IcRelationshipConfig, IcRelationshipExplicit, IcRelationshipPattern, IcTransactionType,
51    IntercompanyConfig, MaterialityBasis, OutputCompression, OutputLayout, OutputLayoutConfig,
52    OwnershipConfig, PeriodConfig, PeriodLength, PillarTwoConfig, TaxGroupConfig, TpConfig,
53    TransferPricingMethod,
54};
55pub use errors::{GroupError, GroupResult};
56pub use manifest::{
57    build_audit_engagement_plan, build_cgu_plan, build_coa_master, build_manifest,
58    build_shard_plan, build_tax_group_plan, chacha_rng_from_seed, derive_aggregate_seed,
59    derive_entity_seed, derive_ic_pair_id, derive_manifest_seed, expand_ic_relationships,
60    expand_ownership, AuditEngagementPlan, CbcReportPlan, CguPlan, ChartOfAccountsMaster,
61    ComponentAuditor, ComponentMaterialityAllocation, ComponentScope, EntitySource, ExpandedEntity,
62    FxRateMaster, GroupManifest, IcSource, ManifestEntity, ManifestPeriod, OwnershipGraphSection,
63    PillarTwoPlan, ResolvedIcRelationship, ShardAssignment, ShardPlan, TaxGroupPlan,
64    TransferPricingPlan, MANIFEST_SCHEMA_VERSION,
65};
66pub use resolve::{resolve_entity, ResolvedEntity};
67pub use standalone::{
68    generate_standalone, generate_standalone_chain, PeriodChainSpec, StandaloneOptions,
69    StandaloneSummary,
70};