proposal.rejectcommandsince 0.1
Rejects a whole pending proposal, with a rationale.
Request
umwelt call story.umw proposal.reject '{
"proposalId": "01a1cbd8-6407-7ab1-9974-a02b78022dc5",
"rationale": "The maid never touched it."
}'Request
const result = await client.proposalReject({
proposalId: '01a1cbd8-6407-7ab1-9974-a02b78022dc5',
rationale: 'The maid never touched it.',
});Request
var result = engine.ProposalReject(new RejectPayload
{
ProposalId = "01a1cbd8-6407-7ab1-9974-a02b78022dc5",
Rationale = "The maid never touched it.",
});Response
{
"id": "01a1cbd8-6407-7ab1-9974-a02b78022dc5",
"status": "rejected",
"input": {
"projectId": "ball",
"event": {
"id": "rumour",
"title": "A rumour",
"position": { "tick": 10 },
"evidence": [],
"participants": ["maid"],
"provenance": { "origin": { "kind": "human" } },
"type": "scene"
},
"records": [
{
"kind": "fact",
"id": "maid-stole",
"claim": {
"subject": "maid",
"predicate": "stole",
"object": { "kind": "entity", "id": "necklace" },
"polarity": true,
"qualifiers": {}
},
"position": { "tick": 10 },
"provenance": { "origin": { "kind": "human" } }
}
],
"transitions": []
},
"rejectionRationale": "The maid never touched it.",
"reviews": []
}Payload
| Field | Type | Description |
|---|---|---|
proposalIdrequired | string | The proposal, by the id propose returned. |
rationalerequired | string | Why. |
Result
| Field | Type | Description |
|---|---|---|
idalways | string | The proposal’s id. |
inputalways | ProposeInput | The commit it holds: the event, records and transitions, as proposed. |
statusalways | "pending" | "applied" | "partially-applied" | "rejected" | pending until it is applied (applied, or partially-applied when some operations were rejected) or rejected. |
reviews | ProposalReview[] | Every review so far, oldest first. The latest one for an operation decides it. |
rejectionRationale | string | Why it was rejected, when it was. |
Rules
Nothing is written. The proposal keeps its content and its reviews, with status rejected.
Errors
VALIDATION_FAILEDThe payload is malformed.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?