Cohort methods: update, delete
The Cohort Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.
Reference for Cohort, one group of Cohort methods.
Cohort.update
Changes the given properties of a Cohort. Verb page.
interface CohortVerbs {
update(input: CohortUpdateInput, options?: SB.CallOptions): SB.Call<Cohort>
}Emits Cohort.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Cohort. |
query | json | The Portfolio query that selects its Startups. | |
control | boolean | True when the Cohort stays on the prior Version as the control. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
cohort | Cohort | required | The Cohort. |
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 cohort = await $.Cohort.update({ id: 'cohort_YxPOKnSexq', query: {} })Cohort.delete
Deletes a Cohort: a soft delete that keeps its history, undone by Thing.restore. Verb page.
interface CohortVerbs {
delete(input: CohortDeleteInput, options?: SB.CallOptions): SB.Call<Cohort>
}Emits Cohort.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Cohort. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
cohort | Cohort | required | The Cohort. |
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 cohort = await $.Cohort.delete({ id: 'cohort_YxPOKnSexq' })