IF Commons GitHub

sql/typed/models/flow.auto

The 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

Source: commons/data/sql/typed/models/flow.auto.ts

40 of 40 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

flownamespace
namespace flow
flow.ProducerRowinterface
interface ProducerRow

Who produces a reason code

MemberTypeWhat it is
codestringThe code other tables point to: a short word that does not change
labelstringWhat a person is shown for the code
descriptionstring | nullWhat the code means, where the label is not enough

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.ProducerInsertinterface
interface ProducerInsert

What an insert into producer takes: what the database fills may be left out.

MemberTypeWhat it is
codestring
labelstring
description?string | null

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.ProducerKeytype
type ProducerKey = { readonly code: string };

The key of a row of producer.

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.producerconst
const producer: Table<ProducerRow, ProducerInsert, "producer">

Who produces a reason code

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.ReasonRowinterface
interface ReasonRow

A reason code that says why a stage stopped, rejected or lost something, so that no loss is unexplained

MemberTypeWhat it is
reasonIdstringWhat identifies the reason: its code
meaningstringWhat it means, in a sentence
producerCodestringWho produces it
stage"captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated" | nullThe stage it is of, where it is of one

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.ReasonInsertinterface
interface ReasonInsert

What an insert into reason takes: what the database fills may be left out.

MemberTypeWhat it is
reasonIdstring
meaningstring
producerCodestring
stage?"captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated" | null

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.ReasonKeytype
type ReasonKey = { readonly reasonId: string };

The key of a row of reason.

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.reasonconst
const reason: Table<ReasonRow, ReasonInsert, "reason">

A reason code that says why a stage stopped, rejected or lost something, so that no loss is unexplained

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.LoadRowinterface
interface LoadRow

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

MemberTypeWhat it is
loadIdstringWhat identifies the load
loadType"backfill" | "delivery" | "incremental" | "replay"What kind of load it is
tenantstring | nullThe tenant it is for
sourcestringThe sender or system it came from
startedAtTimestampWhen it began
rolledBackAtTimestamp | nullWhen it was undone, where it was

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.LoadInsertinterface
interface LoadInsert

What an insert into load takes: what the database fills may be left out.

MemberTypeWhat it is
loadIdstring
loadType"backfill" | "delivery" | "incremental" | "replay"
tenant?string | null
sourcestring
startedAtTimestamp
rolledBackAt?Timestamp | null

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.LoadKeytype
type LoadKey = { readonly loadId: string };

The key of a row of load.

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.loadconst
const 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

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.StageContractRowinterface
interface StageContractRow

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

MemberTypeWhat it is
stageContractIdstringWhat identifies the contract: its pipeline and stage
pipelinestringThe pipeline it is of
stage"captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated"The stage
inputGuaranteestringWhat it may assume of what it is given
outputGuaranteestringWhat it guarantees of what it gives
ownerstringWho answers for it
detectionstringHow a failure of it is found
grain"batch" | "entity" | "message"What a ledger row of it stands for

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.StageContractInsertinterface
interface StageContractInsert

What an insert into stage_contract takes: what the database fills may be left out.

MemberTypeWhat it is
stageContractIdstring
pipelinestring
stage"captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated"
inputGuaranteestring
outputGuaranteestring
ownerstring
detectionstring
grain"batch" | "entity" | "message"

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.StageContractKeytype
type StageContractKey = { readonly stageContractId: string };

The key of a row of stage_contract.

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.stageContractconst
const 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

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.LedgerEntryRowinterface
interface LedgerEntryRow

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

MemberTypeWhat it is
ledgerEntryIdstringWhat identifies the row
subjectstringThe 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
entitiesnumber | nullThe entities a batch carried at this stage
atTimestampWhen
loadIdstringThe load it was in
reasonIdstring | nullWhy, where it did not pass

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.LedgerEntryInsertinterface
interface LedgerEntryInsert

What an insert into ledger_entry takes: what the database fills may be left out.

MemberTypeWhat it is
ledgerEntryIdstring
subjectstring
stage"captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated"
outcome"accepted" | "failed" | "passed" | "rejected" | "unusable"
grain"batch" | "entity" | "message"
entities?number | null
atTimestamp
loadIdstring
reasonId?string | null

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.LedgerEntryKeytype
type LedgerEntryKey = { readonly ledgerEntryId: string };

The key of a row of ledger_entry.

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.ledgerEntryconst
const 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

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.DeliveryRowinterface
interface DeliveryRow

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

MemberTypeWhat it is
deliveryIdstringWhat identifies the message: its tenant and the id its sender gave it
tenantstringThe tenant
senderMessageIdstringThe id the sender gave it
contentSha256stringThe SHA-256 of its content, as first delivered
deliveryCountnumberHow many times the same content has been delivered
firstSeenTimestampWhen it was first seen
firstLoadLoadIdstringThe load of its first delivery

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.DeliveryInsertinterface
interface DeliveryInsert

What an insert into delivery takes: what the database fills may be left out.

MemberTypeWhat it is
deliveryIdstring
tenantstring
senderMessageIdstring
contentSha256string
deliveryCountnumber
firstSeenTimestamp
firstLoadLoadIdstring

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.DeliveryKeytype
type DeliveryKey = { readonly deliveryId: string };

The key of a row of delivery.

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.deliveryconst
const 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

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.DeliveryConflictRowinterface
interface DeliveryConflictRow

A delivery that had the id of one already taken and other content: the original is kept and this is queued to be decided

MemberTypeWhat it is
deliveryConflictIdstringWhat identifies the conflict
incomingSha256stringThe SHA-256 of the content that conflicts
status"kept" | "open" | "replaced"Where it is
seenAtTimestampWhen it was seen
deliveryIdstringThe message it conflicts with
loadIdstringThe load that brought it

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.DeliveryConflictInsertinterface
interface DeliveryConflictInsert

What an insert into delivery_conflict takes: what the database fills may be left out.

MemberTypeWhat it is
deliveryConflictIdstring
incomingSha256string
status"kept" | "open" | "replaced"
seenAtTimestamp
deliveryIdstring
loadIdstring

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.DeliveryConflictKeytype
type DeliveryConflictKey = { readonly deliveryConflictId: string };

The key of a row of delivery_conflict.

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.deliveryConflictconst
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

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.ManifestRowinterface
interface ManifestRow

What a sender says a batch holds: the count to be accounted for, from which every stage and every loss is reconciled

MemberTypeWhat it is
manifestIdstringWhat identifies the batch
sourcestringThe sender
periodstring | nullThe period it covers
manifestCountnumberHow many entities the sender says it sent
loadIdstringThe load that carried it

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.ManifestInsertinterface
interface ManifestInsert

What an insert into manifest takes: what the database fills may be left out.

MemberTypeWhat it is
manifestIdstring
sourcestring
period?string | null
manifestCountnumber
loadIdstring

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.ManifestKeytype
type ManifestKey = { readonly manifestId: string };

The key of a row of manifest.

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.manifestconst
const 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

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.BatchStageRowinterface
interface BatchStageRow

How many entities of a batch a stage confirmed: a step of the funnel from the manifest to what was accepted

MemberTypeWhat it is
batchStageIdstringWhat identifies the count
stage"captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated"The stage
entitiesnumberHow many it confirmed
manifestIdstringThe batch

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.BatchStageInsertinterface
interface BatchStageInsert

What an insert into batch_stage takes: what the database fills may be left out.

MemberTypeWhat it is
batchStageIdstring
stage"captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated"
entitiesnumber
manifestIdstring

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.BatchStageKeytype
type BatchStageKey = { readonly batchStageId: string };

The key of a row of batch_stage.

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.batchStageconst
const 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

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.LossRowinterface
interface LossRow

Entities of a batch that did not go on, with the stage they stopped at and the reason: what makes a loss explained

MemberTypeWhat it is
lossIdstringWhat identifies the loss
stage"captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated"The stage they stopped at
entitiesnumberHow many
manifestIdstringThe batch
reasonIdstringWhy

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.LossInsertinterface
interface LossInsert

What an insert into loss takes: what the database fills may be left out.

MemberTypeWhat it is
lossIdstring
stage"captured" | "dest_verdict" | "forwarded" | "mapped" | "parsed" | "received" | "usable" | "validated"
entitiesnumber
manifestIdstring
reasonIdstring

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.LossKeytype
type LossKey = { readonly lossId: string };

The key of a row of loss.

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

flow.lossconst
const 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

Imported by 21 tests of the run (21 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.