proposal.rebasecommandsince 0.1
Checks which operations of a pending proposal still fit the current head of its timeline. Nothing is applied.
Request
umwelt call story.umw proposal.rebase '{
"proposalId": "01a1cbd8-63fc-7ec1-aac1-c0b733797443"
}'Request
const result = await client.proposalRebase({ proposalId: '01a1cbd8-63fc-7ec1-aac1-c0b733797443' });Request
var result = engine.ProposalRebase(new ProposalId { ProposalIdValue = "01a1cbd8-63fc-7ec1-aac1-c0b733797443" });Response
{
"headVersion": 13,
"operations": [
{ "operationIndex": 0, "valid": true },
{ "operationIndex": 1, "valid": true }
],
"proposal": {
"id": "01a1cbd8-63fc-7ec1-aac1-c0b733797443",
"status": "pending",
"input": {
"projectId": "ball",
"event": {
"id": "confession",
"title": "The confession",
"position": { "tick": 10 },
"evidence": [],
"participants": ["bob", "duchess"],
"provenance": { "origin": { "kind": "human" } },
"type": "scene"
},
"records": [
{
"kind": "holding",
"id": "duchess-knows",
"holder": "duchess",
"claim": {
"subject": "bob",
"predicate": "stole",
"object": { "kind": "entity", "id": "necklace" },
"polarity": true,
"qualifiers": {}
},
"attitude": "knows",
"confidence": 1.0,
"accessibility": "available",
"acquisition": {
"kind": "told-by",
"intent": "honest",
"sourceHolderId": "bob",
"sourceRecordId": "bob-did"
},
"position": { "tick": 10 },
"provenance": { "origin": { "kind": "human" } }
}
],
"transitions": [
{
"status": "superseded",
"position": { "tick": 10 },
"provenance": { "origin": { "kind": "human" } },
"supersededBy": "duchess-knows",
"targetRecordId": "duchess-told"
}
]
},
"reviews": []
}
}Payload
| Field | Type | Description |
|---|---|---|
proposalIdrequired | string | The proposal, by the id propose returned. |
Result
| Field | Type | Description |
|---|---|---|
proposalalways | Proposal | The proposal. |
headVersionalways | integer | The head it was checked against. |
operationsalways | OperationCheck[] | One check per operation: operationIndex, valid, and the error when it is not. |
Rules
Each operation with the ones before it. An operation is checked together with the earlier operations that are still valid.
An expected version moves. A proposal with an expectedVersion is moved to the current head, so it can be reviewed and applied there.
Errors
NOT_FOUNDThe proposal does not exist.INVALID_STATEThe proposal is no longer pending.HANDSHAKE_REQUIREDOver the protocol, hello was not sent first.Every code is listed in Errors.
See also
Was this page helpful?