sdk/add-query
Source
Usage
bash
npm exec saf-workflow kickoff sdk/add-query <path> <urlPath> <method>To run this workflow automatically, tell the agent to:
- Navigate to the target package
- Run this command
- Follow the instructions until done
Checklist
When run, the workflow will:
- Upsert 5 templates.
- Update list.ts to implement the API query.
- Update list.fake.ts to implement the fake handler for testing.
- Run
npm run typecheck - Run
npm run test
Help Docs
bash
Usage: npm exec saf-workflow kickoff sdk/add-query <path> <urlPath> <method>
Add a new API query to the SDK
Arguments:
path The file path to the template file to be created (e.g., './requests/secrets/list.ts')
Example: "./requests/secrets/list.ts"
urlPath The URL path for the API endpoint (e.g., '/secrets' or '/secrets/{id}')
Example: "/example"
method The HTTP method in lowercase (e.g., 'get', 'post', 'put', 'delete')
Example: "get"