Dataset methods: update, delete
The Dataset Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.
Reference for Dataset, one group of Dataset methods.
Dataset.update
Changes the given properties of a Dataset. Verb page.
interface DatasetVerbs {
update(input: DatasetUpdateInput, options?: SB.CallOptions): SB.Call<Dataset>
}Emits Dataset.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Dataset. |
name | string | The name of the Product. | |
promise | text | What the Customer can rely on. | |
records | integer | How many Things it holds. | |
refreshedAt | datetime | When its Sources were last read. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
dataset | Dataset | required | The Dataset. |
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 dataset = await $.Dataset.update({ id: 'dataset_UDQXk0KsJB', records: 1 })Dataset.delete
Deletes a Dataset: a soft delete that keeps its history, undone by Thing.restore. Verb page.
interface DatasetVerbs {
delete(input: DatasetDeleteInput, options?: SB.CallOptions): SB.Call<Dataset>
}Emits Dataset.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Dataset. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
dataset | Dataset | required | The Dataset. |
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 dataset = await $.Dataset.delete({ id: 'dataset_UDQXk0KsJB' })