flowstate-flowstate-platform-epicdm-flowstate-api-clients
Package-local agent skill for @epicdm/flowstate-api-clients.
Tags
Publisher
Versions
1 version published — latest: 0.1.0
- 0.1.0publishedInvalid Date
Skill
flowstate-api-clients Package Skill
Package: @epicdm/flowstate-api-clients
Repository: flowstate-platform
Path: packages/flowstate-api-clients
Version: 0.1.0
Use this published Dojo skill as the package-level entrypoint. For detailed workflows, use the package-local skills listed below.
Primary Package Workflow
FlowState API Clients Workflow
Status: Active
Purpose: Keep generated gateway calls type-safe and compatible with the shared BaseClient.
Scope: packages/flowstate-api-clients
Trigger: A FlowState API endpoint, response type, smoke test, or consuming package needs a typed client change.
Input: Endpoint path, HTTP method, request/response shape, auth expectations, and target service client.
Output: Updated client method, matching types, and focused tests.
Workflow
- Read
src/base-client.tsbefore changing any service client. Preserve bearer auth, JSON encoding, injectedfetch, 204 handling, andqs()semantics. - Update the matching
src/types/<service>.tsfirst when request or response data changes. Avoidany; model optional fields explicitly. - Add or update the grouped method in
src/<service>-client.ts. Follow existing nested groups such asPaymentClient.billing,PaymentClient.admin, andPaymentClient.treasury. - Export new public types through
src/types/index.tsif consumers need them, and confirmsrc/index.tsalready exports the client or type surface. - Add a test in
src/__tests__/<service>-client.test.tsthat injectsfetchand asserts URL, method, headers, JSON body, and parsed response. For default base URL behavior, use the pattern insrc/__tests__/gateway-defaults.test.ts. - Check downstream callers with
rg "@epicdm/flowstate-api-clients|new .*Client|PaymentClient" packages --glob '!**/node_modules/**'.
Example
const client = new PaymentClient({ token: 'test-token', fetch: mockFetch })
await client.billing.usage({ tenantId: 'tenant_123' })
The request should go to https://api.epicflowstate.ai/payments/billing/usage?tenantId=tenant_123 with Authorization: Bearer test-token.
Verification
yarn workspace @epicdm/flowstate-api-clients testyarn workspace @epicdm/flowstate-api-clients typecheckyarn workspace @epicdm/flowstate-api-clients build
Composition
- Use
gateway-specs-openapi-bundle-workflowwhen the method comes from an OpenAPI bundle change. - Use
gateway-routes-route-table-workflowwhen path prefixes or gateway auth behavior are changing.
Package Skill Inventory
Skill Inventory: @epicdm/flowstate-api-clients
Created Skills
| Skill | Type | Trigger |
|---|---|---|
flowstate-api-clients-client-workflows | Workflow | Use when adding, updating, or consuming typed FlowState gateway API clients. |
Candidate Future Skills
| Candidate | Reason to Split Later |
|---|---|
flowstate-api-clients-payment-workflows | Payment has many endpoint groups and smoke-test coverage that may warrant a dedicated reference. |
flowstate-api-clients-error-testing | Useful if more packages start relying on exact BaseClient error strings or 204 behavior. |
Source Evidence
src/base-client.tsowns request mechanics.src/index.tsowns exported public surface.src/payment-client.tsshows endpoint grouping conventions used by the broader client set.src/__tests__/gateway-defaults.test.tsand service tests prove default URL and request behavior.
Review Gate
Review: @epicdm/flowstate-api-clients Skills
Result: Pass for package-local source-backed skill coverage.
Checks
- The skill is task-triggered and teaches the client-extension workflow, not a method inventory.
- Source paths and package scripts are explicit.
- Composition notes point agents to gateway specs/routes and smoke tests.
- Dojo sync is deferred; generated
.flowstate/dojofiles were not modified.
Residual Risk
Only one focused skill was created for this shard. Split payment or marketplace client workflows later if agents repeatedly need endpoint-specific examples.
Usage
Start with this skill to understand the package purpose, then use the package-local focused skills for specific workflows. Keep this Dojo version aligned with packages/flowstate-api-clients/package.json. Do not treat generated feature lists as lessons; use workflow evidence from CODE-REVIEW.md, SKILL-INVENTORY.md, and REVIEW.md.
Install
Run this in your project to install via CLI:
fscloud dojo skill install flowstate-flowstate-platform-epicdm-flowstate-api-clients --target <target> --out ./skillsReplace <target> with your agent target identifier. See the CLI docs for details.