#ts-select

Minimal TypeScript Telepact example that shows all three select targets in one request:

  • -> keeps only the package and latestEvent result fields

  • struct.Package keeps only the trackingId field

  • union.DeliveryEvent keeps only the location field on the Dropoff tag

Browse the files:

Run it:

make run

The request uses the runtime-supported @select_ shape:

[
  {
    "@select_": {
      "->": {
        "Ok_": ["package", "latestEvent"]
      },
      "struct.Package": ["trackingId"],
      "union.DeliveryEvent": {
        "Dropoff": ["location"]
      }
    }
  },
  {
    "fn.trackPackage": {}
  }
]