IF Commons GitHub

sql/typed/models/contract.auto

The 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

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

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

contractnamespace
namespace contract
contract.DataContractRowinterface
interface DataContractRow

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

MemberTypeWhat it is
dataContractIdstringWhat identifies the contract: its dataset and version
datasetstringThe dataset it is of
versionstringThe version of the contract, as major.minor.patch
status"active" | "deprecated" | "draft" | "retired"Where it is
ownerstringWho answers for it
validFromTimestampFrom when it holds
validToTimestamp | nullUntil when it holds, where it ends

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

contract.DataContractInsertinterface
interface DataContractInsert

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

MemberTypeWhat it is
dataContractIdstring
datasetstring
versionstring
status"active" | "deprecated" | "draft" | "retired"
ownerstring
validFromTimestamp
validTo?Timestamp | null

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

contract.DataContractKeytype
type DataContractKey = { readonly dataContractId: string };

The key of a row of data_contract.

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

contract.dataContractconst
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

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

contract.ContractFieldRowinterface
interface ContractFieldRow

One field a data contract promises: its name, its datatype, whether it may be missing and how it is classified

MemberTypeWhat it is
contractFieldIdstringWhat identifies the field: its contract and name
fieldNamestringThe name of the field
datatypestringThe datatype, as the contract names it
nullablebooleanWhether it may be missing
classificationstring | nullHow sensitive it is: public, internal, confidential or restricted
contractDataContractIdstringThe contract it is a field of

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

contract.ContractFieldInsertinterface
interface ContractFieldInsert

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

MemberTypeWhat it is
contractFieldIdstring
fieldNamestring
datatypestring
nullableboolean
classification?string | null
contractDataContractIdstring

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

contract.ContractFieldKeytype
type ContractFieldKey = { readonly contractFieldId: string };

The key of a row of contract_field.

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

contract.contractFieldconst
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

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

contract.PeriodRowinterface
interface PeriodRow

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

MemberTypeWhat it is
periodIdstringWhat identifies the period: its scope and span
scopestringWhat it is a period of
startsOnTimestampWhere it starts
endsOnTimestampWhere it ends, not included
status"closed" | "open" | "reopened"Whether it takes changes
closedBystring | nullWho closed it
closedAtTimestamp | nullWhen it was closed
reasonstring | nullWhy it was opened again, where it was

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

contract.PeriodInsertinterface
interface PeriodInsert

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

MemberTypeWhat it is
periodIdstring
scopestring
startsOnTimestamp
endsOnTimestamp
status"closed" | "open" | "reopened"
closedBy?string | null
closedAt?Timestamp | null
reason?string | null

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

contract.PeriodKeytype
type PeriodKey = { readonly periodId: string };

The key of a row of period.

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

contract.periodconst
const 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

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

contract.ControlRowinterface
interface ControlRow

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

MemberTypeWhat it is
controlIdstringWhat identifies the control
objectivestringWhat must hold
ownerstringWho answers for it
frequencystringHow often it is checked, as a number of days
evidenceRefstringThe test, spec or report that checks it
frameworkstring | nullThe framework or rule it answers to, where one

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

contract.ControlInsertinterface
interface ControlInsert

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

MemberTypeWhat it is
controlIdstring
objectivestring
ownerstring
frequencystring
evidenceRefstring
framework?string | null

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

contract.ControlKeytype
type ControlKey = { readonly controlId: string };

The key of a row of control.

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

contract.controlconst
const 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

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

contract.ControlRunRowinterface
interface ControlRunRow

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

MemberTypeWhat it is
controlRunIdstringWhat identifies the run
result"fail" | "not_run" | "pass" | "waived"What it found
ranAtTimestampWhen
evidencestring | nullWhere the evidence is kept
controlIdstringThe control that was run

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

contract.ControlRunInsertinterface
interface ControlRunInsert

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

MemberTypeWhat it is
controlRunIdstring
result"fail" | "not_run" | "pass" | "waived"
ranAtTimestamp
evidence?string | null
controlIdstring

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

contract.ControlRunKeytype
type ControlRunKey = { readonly controlRunId: string };

The key of a row of control_run.

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

contract.controlRunconst
const 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

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

contract.ConsentRowinterface
interface ConsentRow

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

MemberTypeWhat it is
consentIdstringWhat identifies the consent
subjectstringWhose it is, as a pseudonymous key
purposestringWhat the data may be used for
status"granted" | "withdrawn"Whether it is in force
validFromTimestampFrom when it holds
validToTimestamp | nullUntil when it holds, where it ends

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

contract.ConsentInsertinterface
interface ConsentInsert

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

MemberTypeWhat it is
consentIdstring
subjectstring
purposestring
status"granted" | "withdrawn"
validFromTimestamp
validTo?Timestamp | null

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

contract.ConsentKeytype
type ConsentKey = { readonly consentId: string };

The key of a row of consent.

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

contract.consentconst
const 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

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

contract.CanaryTokenRowinterface
interface CanaryTokenRow

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

MemberTypeWhat it is
canaryTokenIdstringWhat identifies the token: the value itself
plantedInstringWhere it was planted
plantedAtTimestampWhen
purposestringWhat its appearance would mean

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

contract.CanaryTokenInsertinterface
interface CanaryTokenInsert

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

MemberTypeWhat it is
canaryTokenIdstring
plantedInstring
plantedAtTimestamp
purposestring

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

contract.CanaryTokenKeytype
type CanaryTokenKey = { readonly canaryTokenId: string };

The key of a row of canary_token.

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

contract.canaryTokenconst
const 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

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

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