#ts-select
Minimal TypeScript Telepact example that shows all three select targets in one request:
->keeps only thepackageandlatestEventresult fieldsstruct.Packagekeeps only thetrackingIdfieldunion.DeliveryEventkeeps only thelocationfield on theDropofftag
Browse the files:
api/select.telepact.yaml- Telepact schemaserver.ts- server implementationtest_example.ts- example testtest_support.ts- test helpersMakefile- local run target
Run it:
make runThe request uses the runtime-supported @select_ shape:
[
{
"@select_": {
"->": {
"Ok_": ["package", "latestEvent"]
},
"struct.Package": ["trackingId"],
"union.DeliveryEvent": {
"Dropoff": ["location"]
}
}
},
{
"fn.trackPackage": {}
}
]