Skip to content

sink.moved

Sent when an operator moves a sink by hand (POST …/sinks/{id}/position): back, to have it sent events again, or ahead, skipping what it has not taken. Moving a sink ahead is the only way an event leaves the log before every sink it is for has taken it: the operator’s decision, said here as well as in the audit trail. The events it skipped are removed once no other sink waits for them. The envelope is that of sink.behind. Each move is its own event, with an id of its own.

Schema id: urn:houradvantage:events:3:sink.moved

Fields

FieldTypeRequiredDescription
sinkstringyesThe sink’s id, within its tenant (or the install).
fromintegeryesThe position of the last event it had (or was moved past) before. at least 0
tointegeryesThe position it was moved to: the next event it is sent is the first after it. Greater than from: the events between are skipped; less than from: the events after it are sent again. at least 0
tenantstringTime and Attendance: the tenant the sink is of.

Example

{
"sink": "payroll",
"from": 3950,
"to": 4181
}

JSON Schema

sink.moved.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:houradvantage:events:3:sink.moved",
"title": "sink.moved: data",
"description": "Sent when an operator moves a sink by hand (POST .../sinks/{id}/position): back, to have it sent events again, or ahead, skipping what it has not taken. Moving a sink ahead is the only way an event leaves the log before every sink it is for has taken it: the operator's decision, said here as well as in the audit trail. The events it skipped are removed once no other sink waits for them. The envelope is that of sink.behind. Each move is its own event, with an id of its own.",
"type": "object",
"properties": {
"sink": {
"type": "string",
"description": "The sink's id, within its tenant (or the install)."
},
"from": {
"type": "integer",
"minimum": 0,
"description": "The position of the last event it had (or was moved past) before."
},
"to": {
"type": "integer",
"minimum": 0,
"description": "The position it was moved to: the next event it is sent is the first after it. Greater than from: the events between are skipped; less than from: the events after it are sent again."
},
"tenant": {
"type": "string",
"description": "Time and Attendance: the tenant the sink is of."
}
},
"required": [
"sink",
"from",
"to"
],
"examples": [
{
"sink": "payroll",
"from": 3950,
"to": 4181
}
]
}