Availability programs: update, delete
The Availability Verbs update, delete as MCP do programs, with inputs, result, refusals and an example.
Reference for Availability, one group of Availability programs.
Availability.update
Changes the given properties of an Availability. Verb page.
do: return await $.Availability.update(input)Emits Availability.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Availability. |
worker | Worker | Who is booked: a Human, or an Agent that takes calls. | |
hours | json | Open hours by weekday, in its time zone. | |
timezone | string | An IANA time zone. | |
calendars | string[] | Connected calendars whose busy times it subtracts. | |
buffer | integer | Minutes kept free before and after each Meeting. | |
notice | integer | The fewest hours ahead a Meeting can be booked. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
availability | Availability | required | The Availability. |
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 $.Availability.update({ id: 'availability_8Zj0a7vvRl', worker: 'worker_whZFpOKWIV' })"
}
}Availability.delete
Deletes an Availability: a soft delete that keeps its history, undone by Thing.restore. Verb page.
do: return await $.Availability.delete(input)Emits Availability.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Availability. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
availability | Availability | required | The Availability. |
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 $.Availability.delete({ id: 'availability_8Zj0a7vvRl' })"
}
}