| name | planfix-api-client |
| description | Use this Planfix client to write a Planfix script, query Planfix tasks/contacts/objects, or update a Planfix custom field with this autogenerated TypeScript API client (planfix-api-client). Triggers when a task involves the Planfix REST API in this repo: instantiating the generated *Api classes via loadConfig(), reading data (getTaskList, getContactList, getObjectById), mutating data (postTaskById, postContactById, postContact), or scaffolding a new example script under examples/. |
planfix-api-client
Entry point for using this autogenerated TypeScript client for the Planfix REST API.
The client wraps the Planfix API as 17 *Api classes (100+ endpoints) generated from
swagger.json; this skill maps that surface and the repo's conventions so you can read
and mutate Planfix data and write new automation scripts.
When to use
Use this skill when a task involves the Planfix client in this repo, for example:
- "write a Planfix script to bulk-update a contact custom field"
- "query Planfix tasks/contacts" or "export Planfix contacts"
- "update a Planfix custom field" or any mutation of Planfix data
- understanding which
*Api class / method to call for a Planfix entity
Do not edit src/generated/** — it is regenerated from swagger.json (see AGENTS.md).
Quick start
examples/skill-quickstart.ts is the runnable, compile-checked reference. It loads config,
instantiates TaskApi, and performs a harmless read (getTaskList, pageSize: 1):
import { TaskApi } from '../src/generated';
import { loadConfig } from '../src/config';
const taskApi = new TaskApi(loadConfig());
const res = await taskApi.getTaskList({ getTaskListRequest: { pageSize: 1, fields: 'id,name' } });
Config comes from .env (PLANFIX_ACCOUNT, PLANFIX_TOKEN) via loadConfig() in
src/config.ts.
Workflow: goal → reference
Start from your goal and open the one matching reference:
Verification gate
Examples are outside npm run build (which compiles src/** only). Typecheck the
quickstart — and thereby every API symbol the docs cite — with:
npx tsc --noEmit -p tsconfig.skill.json