@platform/sdk-jobs
Typed TypeScript client for services/jobs. The page is generated from the SDK package source plus its generated OpenAPI types.
Installation
npm install @platform/sdk-jobsYou’ll also need the shared auth/client helpers:
npm install @platform/hosts @platform/sdkQuick start
import { LoopClient } from "@platform/sdk";
import { platformHost, SERVICE_NAMES } from "@platform/hosts";
import { createJobsClient } from "@platform/sdk-jobs";
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 jobs = createJobsClient({
baseUrl: platformHost({ service: SERVICE_NAMES.JOBS }),
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 jobs.GET("/readyz");GET /v1/jobs/me/status
Underlying REST endpoint: GET /v1/jobs/me/status
Parameters
None
Return type
Promise<{
data?: paths["/v1/jobs/me/status"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await jobs.GET("/v1/jobs/me/status");