Skip to content

docs(app-actions-v3): correct single-action return shape (getById/create/update)#284

Merged
Komsomol merged 1 commit into
masterfrom
docs/v3-actions-single-return-shape
Jun 30, 2026
Merged

docs(app-actions-v3): correct single-action return shape (getById/create/update)#284
Komsomol merged 1 commit into
masterfrom
docs/v3-actions-single-return-shape

Conversation

@Komsomol

Copy link
Copy Markdown
Contributor

What

The App Actions V3 docs say the single-action methods return the action wrapped under an action property — { action } — but the JS client unwraps it. Documented result.action.code is undefined; the value is at result.code.

Reported by Yuliia Kovalenko (repro on app 372243, action 85550).

Verified against the client source

public/assets/fliplet-core/1.0/core.js (SHA b2c5c66):

Method Client returns Was documented Now
getById return response.action (bare object) { action } action
create return response.action (bare object) { action } action
update return response.action (bare object) { action } action
publish return response ({ action, status, … }) { action } unchanged — already correct
get (list) { actions, pagination } { actions, pagination } unchanged — already correct

So create and update had the same bug as getById. publish is the one single-action method that genuinely returns a wrapper, so its docs were already right and are left as-is.

Changes (docs-only)

  • Summary table: getById/create/update Returns column { action }action (object)
  • Per-method Returns lines for create, getById, update
  • Inline examples: result.action.*result.* (5 code blocks)
  • "Action object structure" intro: clarified the per-method wrapper shapes

API behaviour is unchanged — live behaviour is the source of truth, and the shipping unwrapped return is what callers already depend on.

🤖 Generated with Claude Code

getById/create/update resolve to the action object directly, not
{ action }. The JS client returns response.action for these three
(core.js L4547/4569/4585), so documented result.action.* access throws.
Fixed the summary table, the per-method Returns lines, the inline
examples, and the Action object structure intro. publish (returns the
full response) and get (returns { actions, pagination }) are correct
and left unchanged.

Reported by Yuliia Kovalenko.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying fliplet-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9caa34b
Status: ✅  Deploy successful!
Preview URL: https://67df5836.fliplet-cli.pages.dev
Branch Preview URL: https://docs-v3-actions-single-retur.fliplet-cli.pages.dev

View logs

@Komsomol Komsomol merged commit 98d5f67 into master Jun 30, 2026
3 checks passed
@Komsomol Komsomol deleted the docs/v3-actions-single-return-shape branch June 30, 2026 11:38
Komsomol added a commit that referenced this pull request Jun 30, 2026
Follow-up to the App Actions V3 return-shape fix (#284). A full audit of
the API/REST doc tree against source found the same bug class recurring:
documented example code that throws or silently misbehaves.

HIGH (example code throws / wrong data):
- core/organizations.md: Settings examples used singular Fliplet.Organization
  (namespace is plural Fliplet.Organizations) -> TypeError
- fliplet-content.md: query() filter passed at top level, lib reads where.content
  -> filter silently ignored, returns ALL entries
- fliplet-datasources.md: subscribe() callback threw on update-only changes;
  guarded the optional inserted/updated/deleted keys
- v3/auth.md: dataSource.validate example omitted the required match column -> 400
- components/record-container.md: removed 4 non-existent instance props; hook
  payload key vm -> instance (matches source)
- components/dynamic-container.md: removed non-existent container.load(); get()
  is by id not name
- fliplet-table.md: search event is search:change {term,data}; removed
  sort:change/row:click/page:change (never fired)
- helpers/references/fields.md: item.get() -> item.field('name').get()
- fliplet-ui-panzoom.md: marker.vars is a property, not marker.vars()

MED/LOW: oauth2 grantType implicit->token and Returns-null fix; encryption
getKey resolves the key string not {key}; datasources upload folderId (not
mediaFolderId) and delete-query returns entries not a count; notifications
instance.remove; ui-typeahead returns Array; ui-actions/ui-timerange
copy-paste fixes; router no-session reason code; gamify dependency name;
payments webhook URL path; like-buttons title; biometrics return values;
helpers views type + ready() syntax; v3 analytics _route/_pageTitle; csv
malformed example; REST status codes (apps publish 201, ds entry 200) and a
copy-pasted analytics heading.

Security: v3/auth.md sendValidation's false "no information leak / 204
regardless" claim removed (the standard flow actually rejects unknown emails
with 400). Reworded to the success contract only, without documenting the
distinguisher. The underlying enumeration divergence is raised separately for
engineering.

Regenerated the .well-known AI indexes (llms.txt, llms-full.txt,
agent-skills, mcp, v3 catalog) so the LLM-facing index reflects these fixes
and the already-merged #284 changes.

All fixes verified against fliplet-api / widget source at master.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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