Skip to main content
sources.Sources

Type parameters

Properties

changes

• Readonly changes: SourceChanges<DataModel>

Methods

recordState

▸ recordState<TableName>(record, options?): Promise<SourceRecordState<DocumentByName<DataModel, TableName>> | null> Read a source-owned operational record and value-free evidence under its current ordinary record access. No historical payload is implied.

Type parameters

Parameters

Returns

Promise<SourceRecordState<DocumentByName<DataModel, TableName>> | null>

commandTarget

▸ commandTarget<Target>(record, options?): Promise<CommandTargetRef<Target> | null> Freeze an acquired command target under current record access. A freshness deadline invalidates this query and fences mutation acceptance.

Type parameters

Parameters

Returns

Promise<CommandTargetRef<Target> | null>

install

▸ install<Target>(table, options): Promise<{ sourceId: SourceId }> Install a verified resource and bind immutable application references in this mutation. The resource is the selection its source’s resourceValidator accepted.

Type parameters

Parameters

Returns

Promise<{ sourceId: SourceId }>

replace

▸ replace<TableName>(source, options): Promise<{ sourceId: SourceId }> Prepare a private replacement for the selected serving source; publication selects it after its entire native group satisfies the table evidence floors. The old source serves meanwhile.

Type parameters

Parameters

Returns

Promise<{ sourceId: SourceId }>

pause

▸ pause<Resource>(source): Promise<{ sourceId: SourceId ; pauseId: PauseId ; isChanged: boolean }> Pause the acquisition owner while retaining its published evidence.

Type parameters

Parameters

Returns

Promise<{ sourceId: SourceId ; pauseId: PauseId ; isChanged: boolean }>

resume

▸ resume<Resource>(source, options): Promise<{ sourceId: SourceId ; isChanged: boolean }> Release exactly the pause observed by this controller. A later pause refuses.

Type parameters

Parameters

Returns

Promise<{ sourceId: SourceId ; isChanged: boolean }>

withdraw

▸ withdraw<Resource>(source): Promise<{ sourceId: SourceId }> Withdraw this installed source through its publication and custody owners.

Type parameters

Parameters

Returns

Promise<{ sourceId: SourceId }>

requestRefresh

▸ requestRefresh<Resource>(source, options?): Promise<SourceRefreshRequest> Record refresh intent atomically with this mutation. Recovering a retained request keeps its original source even after replacement. No provider I/O happens here. Operations may request the same effect.

Type parameters

Parameters

Returns

Promise<SourceRefreshRequest>

getRequest

▸ getRequest(request): Promise<SourceRefreshObservation | null> Observe this caller’s retained source request under current source read authority. A missing or expired request returns null and starts no work.

Parameters

Returns

Promise<SourceRefreshObservation | null>

resolve

▸ resolve<TableName>(source): Promise<SourceInstallation<NamedTableInfo<DataModel, TableName>>> Resolve the selected serving source against this component and table, including empty sources, under the source’s current read rule.

Type parameters

Parameters

Returns

Promise<SourceInstallation<NamedTableInfo<DataModel, TableName>>>
▸ related<TableName>(source, target): Promise<SourceInstallation<NamedTableInfo<DataModel, TableName>>> Resolve a sibling table from this exact resource installation under both roles’ current read policies. Equal provider IDs in other accounts never join. The returned table retains the native source/epoch selection.

Type parameters

Parameters

Returns

Promise<SourceInstallation<NamedTableInfo<DataModel, TableName>>>

terms

▸ terms<T, Resource>(source, fields): Promise<SourceTerms<T>> Reads installation terms under source row authority. The native owner requires the exact validator declared by this source.

Type parameters

Parameters

Returns

Promise<SourceTerms<T>>

barrier

▸ barrier(sourceIds, barrier, options?): Promise<SourceBarrierBasis> Resolve 1..8 source handles under each source’s current read authority. A required refusal also prevents the containing transaction from committing.

Parameters

Returns

Promise<SourceBarrierBasis>

recordWork

▸ recordWork<Resource>(source, key): Promise<SourceRecordWork> Observe one native key’s acquisition work under current source row authority. It starts no work. Changes invalidate this query, including a new obligation created after an idle result. Not available in read rules.

Type parameters

Parameters

Returns

Promise<SourceRecordWork>

fileContract

▸ fileContract(source): Promise<SourceFileContract | null> Inspect the native copy or observed-history role under current source read authority. Null means no admitted file contract; a label is no proof.

Parameters

Returns

Promise<SourceFileContract | null>

requireMembership

▸ requireMembership(source, key, when): Promise<void> Add a current observed record condition to retained source obligations. Derived files/results recheck it at release. This grants no authority and starts no provider I/O. A withdrawal, changed epoch or false condition refuses the prerequisite. Not available inside a read rule.

Parameters

Returns

Promise<void>

fileContent

▸ fileContent(source, key): Promise<SourceFileContent> Inspect an acquired contents or exports role using its native metadata relationship, exact byte identity and retained per-key obligation. Both roles’ current read policies apply. No provider I/O is started.

Parameters

Returns

Promise<SourceFileContent>

artifact

▸ artifact(source, key): Promise<SourceArtifact | null> Resolve the last host-imported file of a content collection under its current read policy and the file’s original protection. Null means no acquired file at this query’s basis. Lookup extends no retention and starts no provider I/O.

Parameters

Returns

Promise<SourceArtifact | null>

status

▸ status<Resource>(source, options): Promise<SourceStatus & { assessment: SourceRequirementAssessment }> Read coverage and update work together under current row authority. Changes to either invalidate a query that reads this status. Keep business decisions on evidence when they do not need scheduler progress. Not available inside a read rule.

Type parameters

Parameters

Returns

Promise<SourceStatus & { assessment: SourceRequirementAssessment }> ▸ status<Resource>(source): Promise<Omit<SourceStatus, "assessment">>

Type parameters

Parameters

Returns

Promise<Omit<SourceStatus, "assessment">>

evidence

▸ evidence<Resource>(source, options?): Promise<SourceEvidence> The selected source’s evidence. A selection naming a table also requires that the source publishes into it; this check includes empty sources, whose binding cannot be inferred from returned rows. A mismatch releases no coverage.

Type parameters

Parameters

Returns

Promise<SourceEvidence>

sync

▸ sync<Resource>(source): Promise<SourceSync | null> What acquisition of the source is doing now. It is read and tracked like evidence, under the same authority, but it moves at every scheduled occurrence, so read it only where it is shown: a decision that reads it re-runs whenever the schedule moves. null when the source has no schedule this caller may see, such as after its connection was re-pointed at another account. Not available inside a read rule.

Type parameters

Parameters

Returns

Promise<SourceSync | null>