API Referencesdks@platform/sdk-workflow

@platform/sdk-workflow

Typed TypeScript client for services/workflow. The page is generated from the SDK package source plus its generated OpenAPI types.

Installation

npm install @platform/sdk-workflow

You’ll also need the shared auth/client helpers:

npm install @platform/hosts @platform/sdk

Quick start

import { LoopClient } from "@platform/sdk";
import { platformHost, SERVICE_NAMES } from "@platform/hosts";
import { createWorkflowClient } from "@platform/sdk-workflow";
 
const loop = new LoopClient({
  clientId: process.env.LOOP_CLIENT_ID!,
  clientSecret: process.env.LOOP_CLIENT_SECRET!,
  redirectUri: "https://your-app.example.com/auth/loop/callback",
});
 
const workflow = createWorkflowClient({
  baseUrl: platformHost({ service: SERVICE_NAMES.WORKFLOW }),
  accessToken: tokens.access_token,
});

Use the convenience helpers below when the SDK exposes them, or call the typed endpoint methods directly with GET / POST / PATCH / DELETE.

Convenience helpers

This SDK does not add convenience helpers beyond the typed endpoint calls below.

Endpoint calls

GET /readyz

Underlying REST endpoint: GET /readyz

Parameters

None

Return type

Promise<{
  data?: paths["/readyz"]["get"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await workflow.GET("/readyz");

GET /v1/workflow/me/runs

Underlying REST endpoint: GET /v1/workflow/me/runs

Parameters

  • query?: paths["/v1/workflow/me/runs"]["get"]["parameters"]["query"]

Return type

Promise<{
  data?: paths["/v1/workflow/me/runs"]["get"]["responses"]["200"]["content"]["application/json"];
  error?: unknown;
  response: Response;
}>

Example

const result = await workflow.GET("/v1/workflow/me/runs", {
  params: {
    query: {
      /* paths["/v1/workflow/me/runs"]["get"]["parameters"]["query"] */
    },
  },
});