Add --unset flag and null-value support for profile property deletion - #47
Merged
Conversation
The API now deletes a profile property when its value is null (getformo/formono#2190). --properties JSON already passed nulls through; this adds the --unset sugar on formo profiles update, documents null rows for properties batch, and guards user_id client-side with a clear error. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
yosriady
added a commit
to getformo/docs.formo.so
that referenced
this pull request
Aug 7, 2026
Sync api/openapi.json with getformo/formono#2190: PUT /v0/profiles/{address}/properties and the batch endpoint accept null values to unset properties. Add prose sections on deletion semantics (global-fallback masking, user_id exclusion, reserved tombstone, point-in-time behavior), update the MCP tool table, and document the CLI --unset flag and null rows (getformo/cli#47). Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Formo API now supports deleting profile properties by sending
nullvalues (getformo/formono#2190). This PR adds the CLI surface for it:formo profiles updategains an--unsetflag: a comma-separated list of property keys to delete (shorthand fornullvalues in--properties).--propertiesbecomes optional; at least one of the two is required, and--unsetkeys win over--propertieson overlap.nullvalues in--propertiesJSON and in--rowsforformo profiles properties batchpass through to the API unchanged (they already did mechanically; this documents it in the option descriptions and examples).user_idis rejected client-side in--unsetwith a clear error, matching the API rule (it participates in identity stitching and cannot be unset).Deleting a property also hides any globally-enriched fallback value for that field; the command hints mention this.
Tests
7 new unit tests on
buildUpdateProfileBody(unset-to-null mapping, properties+unset merge, explicit-null passthrough, empty/whitespace/user_id rejections). Full suite: 197 passing, 1 pending (live-API), 0 failures.pnpm lintclean.Note: the end-to-end behavior depends on getformo/formono#2190 being deployed; until then the API treats these as validation errors.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.