Relationship programs: update, delete
The Relationship Verbs update, delete as MCP do programs, with inputs, result, refusals and an example.
Reference for Relationship, one group of Relationship programs.
Relationship.update
Changes the given properties of a Relationship. Verb page.
do: return await $.Relationship.update(input)Emits Relationship.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Relationship. |
predicate | string | The name read from the source, such as makes. | |
inverse | string | The name read from the target, such as madeBy. | |
provenance | string | Who asserted it: Stated, Ratified, Inferred, or Observed. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
relationship | Relationship | required | The Relationship. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
{
"name": "do",
"arguments": {
"code": "return await $.Relationship.update({ id: 'relationship_iUVcHztTJh', provenance: 'Stated' })"
}
}Relationship.delete
Deletes a Relationship: a soft delete that keeps its history, undone by Thing.restore. Verb page.
do: return await $.Relationship.delete(input)Emits Relationship.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Relationship. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
relationship | Relationship | required | The Relationship. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
{
"name": "do",
"arguments": {
"code": "return await $.Relationship.delete({ id: 'relationship_iUVcHztTJh' })"
}
}