uplink:Subscription, uplink:Bill, …), and you write one renderer per type.
Output is an object
An action’s output is always a JSON object. Its fields hold vocabulary values, alone or in arrays. Verizon’sfetchAll returns, among others:
identity is an uplink:AccountIdentity, subscriptions an array of uplink:Subscription, bill a single uplink:Bill, and usage an array of uplink:Usage. accountType is Verizon-specific.
Field names differ between connectors — Verizon returns one bill, Chase an array of bills — so don’t hard-code them. Read them from produces.
produces
Every connector in the catalog lists the vocabulary values its actions return. ConnectorListItem, ConnectorDetail, and the connector on each ConnectionWithGrants all carry it:
produces from each action’s published output schema, so you can choose a renderer before running anything:
produces are connector-specific.
Each invocation also reports an
outputType, a label for its whole output — usually connector-specific, such as atomic:VerizonAccount. Dispatch on produces, not outputType.Decode with UplinkVocabulary
The UplinkVocabulary Swift package has a Codable struct for every vocabulary type. Each exposes its identifier as vocabularyType:
produces entry out of an action’s output:
Without the package
You can mirror the JSON Schemas from@uplink-code/vocabulary as your own Codable structs. Match the field names exactly, and keep string fields — including dates — as String:
What’s next
Semantic vocabulary
Every type and its fields
Displaying invocation state
Observe progress until the output is ready