When a sink is configured, the output of the job or queue is written to the sink. The output is a JSON object that contains the result of the API run with additional information. The structure of the output is mostly similar between jobs and queues with some minor differences.
Our Typescript SDK supports the sink body by providing the SinkResult type. You can read the sink results and cast them to this type to access the properties in a type-safe manner.
import { SinkResult } from "./src/models/components/sinkresult"const sinkResult: SinkResult = JSON.parse(sinkBody);console.log(sinkResult.apiInfo.result);