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
| Property | Type | Required | Description |
|---|---|---|---|
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. |
Object
{
"$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, inversemappings.
Verbs
createCreates a Mapping.POST /{namespace}/mappingsgetReturns one Mapping by id.GET /{namespace}/mappings/{id}listReturns Mappings, newest first, one page at a time.GET /{namespace}/mappingsupdateChanges the given properties of a Mapping.PATCH /{namespace}/mappings/{id}deleteDeletes a Mapping; its history is kept.DELETE /{namespace}/mappings/{id}
Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.
| Operation | owner | admin | member | viewer |
|---|---|---|---|---|
Mapping.create | Yes | Yes | Yes | No |
Mapping.get | Yes | Yes | Yes | Yes |
Mapping.list | Yes | Yes | Yes | Yes |
Mapping.update | Yes | Yes | Yes | No |
Mapping.delete | Yes | Yes | Yes | No |
Call it
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.