Skip to main content

DiffMetadata

A Diff paired with the actions that will apply it, and the order they run in.

A transaction is a list of these, so this is the shape you read when inspecting what a run did - in an event payload, or in a test.

@group

Functions/Diff

Index

Properties

readonlyaction

action: DiffAction

The diff's action: add, delete, replace or update.

readonlyactions

actions: IUnknownModelAction[] | IUnknownResourceAction[]

The actions that apply the diff, in the order they run.

applied

applied: boolean

Whether the actions have run.

applyOrder

applyOrder: number

The level the diff applies at: the diffs of one level run together, after every lower level. -1 until the transaction orders it.

readonlydiff

diff: Diff

The diff itself.

readonlyfield

field: string

The field of the node that changed.

readonlyinputs

inputs: ActionInputs = { inputs: {}, metadata: {}, models: {}, overlays: {}, resources: {} }

What the actions receive: the module's inputs and metadata, and the models, overlays and resources they asked for.

readonlynode

node: UnknownNode

The node that changed.

readonlyoutputs

outputs: ActionOutputs = {}

The resources the actions produced, by resource id.

readonlyvalue

value: unknown

The changed value: for most diffs the node or the value of field.