contractnamespacenamespace contractThe typed tables of the contract model, generated by IFC Data from the model. Do not edit: change the model and run bun tools/typed.ts --write.
What a dataset promises, when the promises hold, and the proof that they are kept
contractnamespacenamespace contractcontract.DataContractRowinterfaceinterface DataContractRowWhat a dataset promises to those who read it, in one version: its owner, its status and the dates between which the version holds; its fields are the fields of the contract
| Member | Type | What it is |
|---|---|---|
dataContractId | string | What identifies the contract: its dataset and version |
dataset | string | The dataset it is of |
version | string | The version of the contract, as major.minor.patch |
status | "active" | "deprecated" | "draft" | "retired" | Where it is |
owner | string | Who answers for it |
validFrom | Timestamp | From when it holds |
validTo | Timestamp | null | Until when it holds, where it ends |
contract.DataContractInsertinterfaceinterface DataContractInsertWhat an insert into data_contract takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
dataContractId | string | |
dataset | string | |
version | string | |
status | "active" | "deprecated" | "draft" | "retired" | |
owner | string | |
validFrom | Timestamp | |
validTo? | Timestamp | null |
type DataContractKey = { readonly dataContractId: string };The key of a row of data_contract.
const dataContract: Table<DataContractRow, DataContractInsert, "dataContract">What a dataset promises to those who read it, in one version: its owner, its status and the dates between which the version holds; its fields are the fields of the contract
contract.ContractFieldRowinterfaceinterface ContractFieldRowOne field a data contract promises: its name, its datatype, whether it may be missing and how it is classified
| Member | Type | What it is |
|---|---|---|
contractFieldId | string | What identifies the field: its contract and name |
fieldName | string | The name of the field |
datatype | string | The datatype, as the contract names it |
nullable | boolean | Whether it may be missing |
classification | string | null | How sensitive it is: public, internal, confidential or restricted |
contractDataContractId | string | The contract it is a field of |
contract.ContractFieldInsertinterfaceinterface ContractFieldInsertWhat an insert into contract_field takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
contractFieldId | string | |
fieldName | string | |
datatype | string | |
nullable | boolean | |
classification? | string | null | |
contractDataContractId | string |
type ContractFieldKey = { readonly contractFieldId: string };The key of a row of contract_field.
const contractField: Table<ContractFieldRow, ContractFieldInsert, "contractField">One field a data contract promises: its name, its datatype, whether it may be missing and how it is classified
contract.PeriodRowinterfaceinterface PeriodRowA span of time of one scope (a month of a ledger, a reporting quarter) that takes changes while it is open and is closed when its figures are final
| Member | Type | What it is |
|---|---|---|
periodId | string | What identifies the period: its scope and span |
scope | string | What it is a period of |
startsOn | Timestamp | Where it starts |
endsOn | Timestamp | Where it ends, not included |
status | "closed" | "open" | "reopened" | Whether it takes changes |
closedBy | string | null | Who closed it |
closedAt | Timestamp | null | When it was closed |
reason | string | null | Why it was opened again, where it was |
contract.PeriodInsertinterfaceinterface PeriodInsertWhat an insert into period takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
periodId | string | |
scope | string | |
startsOn | Timestamp | |
endsOn | Timestamp | |
status | "closed" | "open" | "reopened" | |
closedBy? | string | null | |
closedAt? | Timestamp | null | |
reason? | string | null |
type PeriodKey = { readonly periodId: string };The key of a row of period.
contract.periodconstconst period: Table<PeriodRow, PeriodInsert, "period">A span of time of one scope (a month of a ledger, a reporting quarter) that takes changes while it is open and is closed when its figures are final
contract.ControlRowinterfaceinterface ControlRowA control: what must hold, who answers for it, how often it is checked and the test or evidence that checks it, one row of the control matrix
| Member | Type | What it is |
|---|---|---|
controlId | string | What identifies the control |
objective | string | What must hold |
owner | string | Who answers for it |
frequency | string | How often it is checked, as a number of days |
evidenceRef | string | The test, spec or report that checks it |
framework | string | null | The framework or rule it answers to, where one |
contract.ControlInsertinterfaceinterface ControlInsertWhat an insert into control takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
controlId | string | |
objective | string | |
owner | string | |
frequency | string | |
evidenceRef | string | |
framework? | string | null |
type ControlKey = { readonly controlId: string };The key of a row of control.
contract.controlconstconst control: Table<ControlRow, ControlInsert, "control">A control: what must hold, who answers for it, how often it is checked and the test or evidence that checks it, one row of the control matrix
contract.ControlRunRowinterfaceinterface ControlRunRowWhat one run of a control found and when, with the evidence of it: a row of the history of a control, only added to
| Member | Type | What it is |
|---|---|---|
controlRunId | string | What identifies the run |
result | "fail" | "not_run" | "pass" | "waived" | What it found |
ranAt | Timestamp | When |
evidence | string | null | Where the evidence is kept |
controlId | string | The control that was run |
contract.ControlRunInsertinterfaceinterface ControlRunInsertWhat an insert into control_run takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
controlRunId | string | |
result | "fail" | "not_run" | "pass" | "waived" | |
ranAt | Timestamp | |
evidence? | string | null | |
controlId | string |
type ControlRunKey = { readonly controlRunId: string };The key of a row of control_run.
contract.controlRunconstconst controlRun: Table<ControlRunRow, ControlRunInsert, "controlRun">What one run of a control found and when, with the evidence of it: a row of the history of a control, only added to
contract.ConsentRowinterfaceinterface ConsentRowA subject's consent to a purpose between two dates, and whether it was taken back: what makes a use of their data allowed or not
| Member | Type | What it is |
|---|---|---|
consentId | string | What identifies the consent |
subject | string | Whose it is, as a pseudonymous key |
purpose | string | What the data may be used for |
status | "granted" | "withdrawn" | Whether it is in force |
validFrom | Timestamp | From when it holds |
validTo | Timestamp | null | Until when it holds, where it ends |
contract.ConsentInsertinterfaceinterface ConsentInsertWhat an insert into consent takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
consentId | string | |
subject | string | |
purpose | string | |
status | "granted" | "withdrawn" | |
validFrom | Timestamp | |
validTo? | Timestamp | null |
type ConsentKey = { readonly consentId: string };The key of a row of consent.
contract.consentconstconst consent: Table<ConsentRow, ConsentInsert, "consent">A subject's consent to a purpose between two dates, and whether it was taken back: what makes a use of their data allowed or not
contract.CanaryTokenRowinterfaceinterface CanaryTokenRowA made-up value planted in a dataset or an environment that no honest process has a use for, so that its appearance elsewhere shows a leak
| Member | Type | What it is |
|---|---|---|
canaryTokenId | string | What identifies the token: the value itself |
plantedIn | string | Where it was planted |
plantedAt | Timestamp | When |
purpose | string | What its appearance would mean |
contract.CanaryTokenInsertinterfaceinterface CanaryTokenInsertWhat an insert into canary_token takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
canaryTokenId | string | |
plantedIn | string | |
plantedAt | Timestamp | |
purpose | string |
type CanaryTokenKey = { readonly canaryTokenId: string };The key of a row of canary_token.
contract.canaryTokenconstconst canaryToken: Table<CanaryTokenRow, CanaryTokenInsert, "canaryToken">A made-up value planted in a dataset or an environment that no honest process has a use for, so that its appearance elsewhere shows a leak