Skip to content

feat(flows): add flow + builder config commands - #13

Open
mlnchk wants to merge 5 commits into
mainfrom
prepare-cli-support-mr-13309
Open

feat(flows): add flow + builder config commands#13
mlnchk wants to merge 5 commits into
mainfrom
prepare-cli-support-mr-13309

Conversation

@mlnchk

@mlnchk mlnchk commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Adds CLI support for the five new Developer API flow endpoints, following the existing paywall/placement proxy pattern.

Commands

Command Endpoint
flows list --app UUID GET .../flows/ (paginated)
flows create --app UUID --name POST .../flows/
flows get --app UUID FLOW_ID GET .../flows/<id>/
flows config get --app UUID FLOW_ID GET .../flows/<id>/config/
flows config update --app UUID FLOW_ID PUT .../flows/<id>/config/

Notes

  • config update takes the builder config via --config (inline JSON) or --config-file PATH/- (file/stdin), reusing the repo's existing file-read pattern. Config is forwarded verbatim — FlowFrontConfig is the schema of record downstream.
  • Optional --remote-configs (JSON array) and --expected-updated-at (optimistic-lock token) map to the write DTO.
  • A freshly created flow has no config until the first config update; config get returns 404 until then.
  • FlowStatus typed as string — the server enum's full value set isn't in the MR diff, so narrowing was avoided.
  • DELETE/publish/rename/placement-assignment are out of scope server-side, so no CLI commands for those.

Supporting changes

  • src/lib/api-schemas.ts — flow DTOs.
  • package.jsonflows and flows:config topics.
  • README.md + CLAUDE.md — docs.
  • test/commands/flows.test.ts — 6 tests covering all routes and body/lock-token forwarding.

Verification

pnpm build clean, pnpm test (mocha + eslint) → 140 passing.

@mlnchk
mlnchk force-pushed the prepare-cli-support-mr-13309 branch from 6a6f68e to 6d1b462 Compare August 18, 2026 13:20
mlnchk added 2 commits August 18, 2026 18:38
Add Developer API flow support: flows list/get/create and
flows config get/update (builder config with optimistic lock).
@mlnchk
mlnchk force-pushed the prepare-cli-support-mr-13309 branch from 72610c2 to a0302b4 Compare August 18, 2026 13:39
mlnchk added 3 commits August 19, 2026 13:18
ApiError.message was set to the error code (e.g. 'validation_error'),
so oclif printed cryptic errors like 'ApiError: validation_error'.
Compose the message from the server's field errors (falling back to
the code) and expose it as oclif's `code`, so every command surfaces
the real reason (e.g. 'Flow version does not exist.').
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant