Team methods: update, delete
The Team Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.
Reference for Team, one group of Team methods.
Team.update
Changes the given properties of a Team. Verb page.
interface TeamVerbs {
update(input: TeamUpdateInput, options?: SB.CallOptions): SB.Call<Team>
}Emits Team.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Team. |
mission | text | What the Team is for, in one sentence. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
team | Team | required | The Team. |
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
import { $ } from 'startup-builder'
const team = await $.Team.update({ id: 'team_v8KkFBrXCN', mission: 'Example mission' })Team.delete
Deletes a Team: a soft delete that keeps its history, undone by Thing.restore. Verb page.
interface TeamVerbs {
delete(input: TeamDeleteInput, options?: SB.CallOptions): SB.Call<Team>
}Emits Team.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Team. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
team | Team | required | The Team. |
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
import { $ } from 'startup-builder'
const team = await $.Team.delete({ id: 'team_v8KkFBrXCN' })