Mapping methods: update, delete
The Mapping Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.
Reference for Mapping, one group of Mapping methods.
Mapping.update
Changes the given properties of a Mapping. Verb page.
interface MappingVerbs {
update(input: MappingUpdateInput, options?: SB.CallOptions): SB.Call<Mapping>
}Emits Mapping.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Mapping. |
verb | string | The Verb it serves, such as Meeting.book; a Verb has many Mappings, ranked. | |
fields | json | Each outside field or event and the Noun property or Event it maps to. | |
direction | string | both still keeps db.sb the record; the outside tool never becomes a second one. | |
convert | text | How a value changes on the way, such as cents to money or a picklist to closed values. | |
rank | integer | Order tried when the preferred Mapping fails or finds nothing; the Policy orders it by cost per accepted result. | |
preferred | boolean | True for the Mapping a Verb tries first. | |
door | string | How the outside endpoint is classed; an unclassed write is one-way and waits its delay window. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
mapping | Mapping | required | The Mapping. |
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 mapping = await $.Mapping.update({ id: 'mapping_WOromrQi6J', verb: 'Meeting.book' })Mapping.delete
Deletes a Mapping: a soft delete that keeps its history, undone by Thing.restore. Verb page.
interface MappingVerbs {
delete(input: MappingDeleteInput, options?: SB.CallOptions): SB.Call<Mapping>
}Emits Mapping.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Mapping. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
mapping | Mapping | required | The Mapping. |
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 mapping = await $.Mapping.delete({ id: 'mapping_WOromrQi6J' })