Skip to content

feat(flows): add advisory config validate command - #15

Open
mlnchk wants to merge 2 commits into
mainfrom
flows-config-validate
Open

feat(flows): add advisory config validate command#15
mlnchk wants to merge 2 commits into
mainfrom
flows-config-validate

Conversation

@mlnchk

@mlnchk mlnchk commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

What

Adds adapty flows config validate — the CLI counterpart to the new advisory publishability endpoint POST /apps/{app_id}/flows/{flow_id}/config/validate/ (dashboard-api MR !13346).

It sends a bare builder config (via --config, --config-file, or stdin — same input handling as config update) and prints the {valid, issues[]} verdict. The endpoint always returns HTTP 200; the CLI surfaces the verdict as an exit code (non-zero when not publishable) so scripts and agents can gate on it.

Details

  • --source flag → sent as X-Adapty-Source for caller attribution (default adapty-cli, e.g. byo-cli for an agent-driven call).
  • Advisory only — does not save; PUT .../config/ still accepts configs this rejects.
  • New response types in api-schemas.ts; docs updated in CLAUDE.md.

Tests

Two new tests (request/header assertion + non-zero exit on invalid). All 8 flow tests pass; build clean.

Also bumps version to 0.6.1-beta.0.

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