Skip to content

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.

TypeScript
interface DatasetVerbs {
  update(input: DatasetUpdateInput, options?: SB.CallOptions): SB.Call<Dataset>
}

Emits Dataset.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Dataset.
namestringThe name of the Product.
promisetextWhat the Customer can rely on.
recordsintegerHow many Things it holds.
refreshedAtdatetimeWhen its Sources were last read.

Returns

OutputTypeRequiredDescription
datasetDatasetrequiredThe Dataset.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
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.

TypeScript
interface DatasetVerbs {
  delete(input: DatasetDeleteInput, options?: SB.CallOptions): SB.Call<Dataset>
}

Emits Dataset.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Dataset.

Returns

OutputTypeRequiredDescription
datasetDatasetrequiredThe Dataset.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const dataset = await $.Dataset.delete({ id: 'dataset_UDQXk0KsJB' })