Skip to content

Mapping

A Mapping translates one Source’s shape into the registry’s: its fields to a Noun’s fields, or an outside endpoint’s inputs and outputs to a Verb’s.

Properties

PropertyTypeRequiredDescription
verbstringThe Verb it serves, such as Meeting.book; a Verb has many Mappings, ranked.
fieldsjsonEach outside field or event and the Noun property or Event it maps to.
directionstringboth still keeps db.sb the record; the outside tool never becomes a second one.
converttextHow a value changes on the way, such as cents to money or a picklist to closed values.
rankintegerOrder tried when the preferred Mapping fails or finds nothing; the Policy orders it by cost per accepted result.
preferredbooleanTrue for the Mapping a Verb tries first.
doorstringHow the outside endpoint is classed; an unclassed write is one-way and waits its delay window.

Object

JSON
{
  "$id": "https://api.sb/petpantry.shop/mappings/mapping_1",
  "$type": "Mapping",
  "verb": "Meeting.book",
  "fields": {},
  "direction": "in",
  "convert": "Cents to money",
  "rank": 1,
  "preferred": true,
  "door": "oneWay"
}

Relationships

  • A Mapping translates one Source: a Source reaches the registry’s Nouns and Verbs through its Mappings, one per Verb it serves. translates, inverse mappings.

Verbs

  1. createCreates a Mapping.
    POST /{namespace}/mappingsdoMapping.created
  2. getReturns one Mapping by id.
    GET /{namespace}/mappings/{id}readNo Event
  3. listReturns Mappings, newest first, one page at a time.
    GET /{namespace}/mappingsreadNo Event
  4. updateChanges the given properties of a Mapping.
    PATCH /{namespace}/mappings/{id}doMapping.updated
  5. deleteDeletes a Mapping; its history is kept.
    DELETE /{namespace}/mappings/{id}doMapping.deleted

Permissions

Which Access level may call each Verb. One-way Verbs wait their delay window.

Operationowneradminmemberviewer
Mapping.createYesYesYesNo
Mapping.getYesYesYesYes
Mapping.listYesYesYesYes
Mapping.updateYesYesYesNo
Mapping.deleteYesYesYesNo

Call it

Text
Add a mapping to Kiln Bakery.

Example

A Startup books Meetings through an outside calendar tool. One Mapping turns the tool's start_time into the Meeting's at, and a second, lower-ranked Mapping takes over when the first finds no slot.