Collection methods: update, delete
The Collection Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.
Reference for Collection, one group of Collection methods.
Collection.update
Changes the given properties of a Collection. Verb page.
interface CollectionVerbs {
update(input: CollectionUpdateInput, options?: SB.CallOptions): SB.Call<Collection>
}Emits Collection.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Collection. |
type | list of Noun | The Nouns this Thing is an instance of. | |
outside | json | The ids this Thing has in outside tools, one per Integration, so a re-run matches instead of duplicating. | |
query | json | The saved query that defines a dynamic Collection. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
collection | Collection | required | The Collection. |
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 collection = await $.Collection.update({ id: 'collection_txTK8QorKn', query: {} })Collection.delete
Deletes a Collection: a soft delete that keeps its history, undone by Thing.restore. Verb page.
interface CollectionVerbs {
delete(input: CollectionDeleteInput, options?: SB.CallOptions): SB.Call<Collection>
}Emits Collection.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Collection. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
collection | Collection | required | The Collection. |
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 collection = await $.Collection.delete({ id: 'collection_txTK8QorKn' })