flownamespacenamespace flowThe typed tables of the flow model, generated by IFC Data from the model. Do not edit: change the model and run bun tools/typed.ts --write.
How data moves through a pipeline, and the proof that nothing was lost on the way
flownamespacenamespace flowflow.ProducerRowinterfaceinterface ProducerRowWho produces a reason code
| Member | Type | What it is |
|---|---|---|
code | string | The code other tables point to: a short word that does not change |
label | string | What a person is shown for the code |
description | string | null | What the code means, where the label is not enough |
flow.ProducerInsertinterfaceinterface ProducerInsertWhat an insert into producer takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
code | string | |
label | string | |
description? | string | null |
flow.ProducerKeytypetype ProducerKey = { readonly code: string };The key of a row of producer.
flow.producerconstconst producer: Table<ProducerRow, ProducerInsert, "producer">Who produces a reason code
flow.ReasonRowinterfaceinterface ReasonRowA reason code that says why a stage stopped, rejected or lost something, so that no loss is unexplained
| Member | Type | What it is |
|---|---|---|
reasonId | string | What identifies the reason: its code |
meaning | string | What it means, in a sentence |
producerCode | string | Who produces it |
stage | "captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated" | null | The stage it is of, where it is of one |
flow.ReasonInsertinterfaceinterface ReasonInsertWhat an insert into reason takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
reasonId | string | |
meaning | string | |
producerCode | string | |
stage? | "captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated" | null |
flow.ReasonKeytypetype ReasonKey = { readonly reasonId: string };The key of a row of reason.
flow.reasonconstconst reason: Table<ReasonRow, ReasonInsert, "reason">A reason code that says why a stage stopped, rejected or lost something, so that no loss is unexplained
flow.LoadRowinterfaceinterface LoadRowOne load: an id given at the first stage and carried on every row and effect it makes, so that it can be traced and undone as one
| Member | Type | What it is |
|---|---|---|
loadId | string | What identifies the load |
loadType | "backfill" | "delivery" | "incremental" | "replay" | What kind of load it is |
tenant | string | null | The tenant it is for |
source | string | The sender or system it came from |
startedAt | Timestamp | When it began |
rolledBackAt | Timestamp | null | When it was undone, where it was |
flow.LoadInsertinterfaceinterface LoadInsertWhat an insert into load takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
loadId | string | |
loadType | "backfill" | "delivery" | "incremental" | "replay" | |
tenant? | string | null | |
source | string | |
startedAt | Timestamp | |
rolledBackAt? | Timestamp | null |
flow.LoadKeytypetype LoadKey = { readonly loadId: string };The key of a row of load.
flow.loadconstconst load: Table<LoadRow, LoadInsert, "load">One load: an id given at the first stage and carried on every row and effect it makes, so that it can be traced and undone as one
flow.StageContractRowinterfaceinterface StageContractRowWhat a stage guarantees to the stage after it, the outcome codes it may give and how its failure is detected: the stage-contract table of a pipeline
| Member | Type | What it is |
|---|---|---|
stageContractId | string | What identifies the contract: its pipeline and stage |
pipeline | string | The pipeline it is of |
stage | "captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated" | The stage |
inputGuarantee | string | What it may assume of what it is given |
outputGuarantee | string | What it guarantees of what it gives |
owner | string | Who answers for it |
detection | string | How a failure of it is found |
grain | "batch" | "entity" | "message" | What a ledger row of it stands for |
flow.StageContractInsertinterfaceinterface StageContractInsertWhat an insert into stage_contract takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
stageContractId | string | |
pipeline | string | |
stage | "captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated" | |
inputGuarantee | string | |
outputGuarantee | string | |
owner | string | |
detection | string | |
grain | "batch" | "entity" | "message" |
type StageContractKey = { readonly stageContractId: string };The key of a row of stage_contract.
flow.stageContractconstconst stageContract: Table<StageContractRow, StageContractInsert, "stageContract">What a stage guarantees to the stage after it, the outcome codes it may give and how its failure is detected: the stage-contract table of a pipeline
flow.LedgerEntryRowinterfaceinterface LedgerEntryRowWhat one stage confirmed of one message, batch or entity, with the load it was in: a row of the stage ledger, only ever added
| Member | Type | What it is |
|---|---|---|
ledgerEntryId | string | What identifies the row |
subject | string | The message, batch or entity it is about |
stage | "captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated" | The stage |
outcome | "accepted" | "failed" | "passed" | "rejected" | "unusable" | What it confirmed |
grain | "batch" | "entity" | "message" | What the row stands for |
entities | number | null | The entities a batch carried at this stage |
at | Timestamp | When |
loadId | string | The load it was in |
reasonId | string | null | Why, where it did not pass |
flow.LedgerEntryInsertinterfaceinterface LedgerEntryInsertWhat an insert into ledger_entry takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
ledgerEntryId | string | |
subject | string | |
stage | "captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated" | |
outcome | "accepted" | "failed" | "passed" | "rejected" | "unusable" | |
grain | "batch" | "entity" | "message" | |
entities? | number | null | |
at | Timestamp | |
loadId | string | |
reasonId? | string | null |
type LedgerEntryKey = { readonly ledgerEntryId: string };The key of a row of ledger_entry.
flow.ledgerEntryconstconst ledgerEntry: Table<LedgerEntryRow, LedgerEntryInsert, "ledgerEntry">What one stage confirmed of one message, batch or entity, with the load it was in: a row of the stage ledger, only ever added
flow.DeliveryRowinterfaceinterface DeliveryRowA message as it first arrived, with the hash of its content and how many times it has been delivered: the intake that makes a redelivery safe
| Member | Type | What it is |
|---|---|---|
deliveryId | string | What identifies the message: its tenant and the id its sender gave it |
tenant | string | The tenant |
senderMessageId | string | The id the sender gave it |
contentSha256 | string | The SHA-256 of its content, as first delivered |
deliveryCount | number | How many times the same content has been delivered |
firstSeen | Timestamp | When it was first seen |
firstLoadLoadId | string | The load of its first delivery |
flow.DeliveryInsertinterfaceinterface DeliveryInsertWhat an insert into delivery takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
deliveryId | string | |
tenant | string | |
senderMessageId | string | |
contentSha256 | string | |
deliveryCount | number | |
firstSeen | Timestamp | |
firstLoadLoadId | string |
flow.DeliveryKeytypetype DeliveryKey = { readonly deliveryId: string };The key of a row of delivery.
flow.deliveryconstconst delivery: Table<DeliveryRow, DeliveryInsert, "delivery">A message as it first arrived, with the hash of its content and how many times it has been delivered: the intake that makes a redelivery safe
flow.DeliveryConflictRowinterfaceinterface DeliveryConflictRowA delivery that had the id of one already taken and other content: the original is kept and this is queued to be decided
| Member | Type | What it is |
|---|---|---|
deliveryConflictId | string | What identifies the conflict |
incomingSha256 | string | The SHA-256 of the content that conflicts |
status | "kept" | "open" | "replaced" | Where it is |
seenAt | Timestamp | When it was seen |
deliveryId | string | The message it conflicts with |
loadId | string | The load that brought it |
flow.DeliveryConflictInsertinterfaceinterface DeliveryConflictInsertWhat an insert into delivery_conflict takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
deliveryConflictId | string | |
incomingSha256 | string | |
status | "kept" | "open" | "replaced" | |
seenAt | Timestamp | |
deliveryId | string | |
loadId | string |
type DeliveryConflictKey = { readonly deliveryConflictId: string };The key of a row of delivery_conflict.
const deliveryConflict: Table<DeliveryConflictRow, DeliveryConflictInsert, "deliveryConflict">A delivery that had the id of one already taken and other content: the original is kept and this is queued to be decided
flow.ManifestRowinterfaceinterface ManifestRowWhat a sender says a batch holds: the count to be accounted for, from which every stage and every loss is reconciled
| Member | Type | What it is |
|---|---|---|
manifestId | string | What identifies the batch |
source | string | The sender |
period | string | null | The period it covers |
manifestCount | number | How many entities the sender says it sent |
loadId | string | The load that carried it |
flow.ManifestInsertinterfaceinterface ManifestInsertWhat an insert into manifest takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
manifestId | string | |
source | string | |
period? | string | null | |
manifestCount | number | |
loadId | string |
flow.ManifestKeytypetype ManifestKey = { readonly manifestId: string };The key of a row of manifest.
flow.manifestconstconst manifest: Table<ManifestRow, ManifestInsert, "manifest">What a sender says a batch holds: the count to be accounted for, from which every stage and every loss is reconciled
flow.BatchStageRowinterfaceinterface BatchStageRowHow many entities of a batch a stage confirmed: a step of the funnel from the manifest to what was accepted
| Member | Type | What it is |
|---|---|---|
batchStageId | string | What identifies the count |
stage | "captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated" | The stage |
entities | number | How many it confirmed |
manifestId | string | The batch |
flow.BatchStageInsertinterfaceinterface BatchStageInsertWhat an insert into batch_stage takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
batchStageId | string | |
stage | "captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated" | |
entities | number | |
manifestId | string |
type BatchStageKey = { readonly batchStageId: string };The key of a row of batch_stage.
flow.batchStageconstconst batchStage: Table<BatchStageRow, BatchStageInsert, "batchStage">How many entities of a batch a stage confirmed: a step of the funnel from the manifest to what was accepted
flow.LossRowinterfaceinterface LossRowEntities of a batch that did not go on, with the stage they stopped at and the reason: what makes a loss explained
| Member | Type | What it is |
|---|---|---|
lossId | string | What identifies the loss |
stage | "captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated" | The stage they stopped at |
entities | number | How many |
manifestId | string | The batch |
reasonId | string | Why |
flow.LossInsertinterfaceinterface LossInsertWhat an insert into loss takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
lossId | string | |
stage | "captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated" | |
entities | number | |
manifestId | string | |
reasonId | string |
flow.LossKeytypetype LossKey = { readonly lossId: string };The key of a row of loss.
flow.lossconstconst loss: Table<LossRow, LossInsert, "loss">Entities of a batch that did not go on, with the stage they stopped at and the reason: what makes a loss explained