Skip to content

feat(files): read a file by id; expanded references on the record reads - #43

Open
Domantas wants to merge 8 commits into
mainfrom
audit/schema-content
Open

Domantas wants to merge 8 commits into
mainfrom
audit/schema-content

Conversation

@Domantas

@Domantas Domantas commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Schema-content campaign, client side — @norbix.ai/react-redux against the @norbix.ai/ts branch audit/schema-content. Do not merge yet: the core SDK release that carries these methods is not published; this branch ships after the gateway campaign lands.

What changed:

  • useGetFileByIdQuery (hub.files.getFileById, GET /{version}/files/item/by-id) and useGetFileByIdApiQuery (api.files.getFileById, GET /{version}/files/{filesIntegrationId}/by-id/{id}) — read a file by the stable id a record's file field stores. Both provide Files. Endpoint counts 23 / 11.
  • expandReferences on useFindCollectionQuery / useFindOneQuery / useFindOwnQuery and arrayFilters on useUpdateOneMutation / useUpdateManyMutation need no new hook (request fields passed through); documented in the hook comments and README.
  • Tests: 267 passed, 2 skipped (was 254). Hook shape, fake-transport reach, and real-SDK fake-fetch wire tests for both by-id routes (path vs query string), expandReferences=true on the three reads, the 056 refusal, arrayFilters on update one.

How it was built: npm pack of the norbix-js worktree on audit/schema-content, installed here with npm install --no-save — package.json / package-lock.json are untouched, so the checks on this pull request run against npm's @norbix.ai/ts 4.11.0 and the typecheck / tests are red by design until the core SDK releases.

Before merging: bump @norbix.ai/ts (dev + peer) to the released version on this branch, re-run npm test, npm run typecheck, npm run lint, then "Rebase and merge".

Task file: docs/tasks/schema-content-react-redux.md.

🤖 Generated with Claude Code

Domantas and others added 7 commits October 7, 2026 11:15
…verlay, plan

Step 1 of docs/tasks/schema-content-react-redux.md. Built against the @norbix.ai/ts
branch audit/schema-content as an npm-pack tarball installed with --no-save; package.json
stays on 4.11.0 until the core SDK release.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…file by its stable id

Step 2 of docs/tasks/schema-content-react-redux.md. hub.files.getFileById
(GET /{version}/files/item/by-id) and api.files.getFileById
(GET /{version}/files/{filesIntegrationId}/by-id/{id}); the Api hook carries the Api suffix
like deleteFileApi because both surfaces share one flat endpoint map. Both provide Files.
Endpoint counts 23 / 11.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… the updates

Step 3 of docs/tasks/schema-content-react-redux.md. No new hook: the option is a field of the
request the existing findCollection / findOne / findOwn hooks pass through. Comments explain
the { id, display } shape, error CM-ERRORS-DATABASE-056 and the cache behaviour.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…s reach the wire

Step 4 of docs/tasks/schema-content-react-redux.md. Hook shape (counts 23 / 11, Files query
tags, no shadowing in the flat map), fake-transport reach tests, and real-SDK fake-fetch tests:
Api by-id substitutes both ids into the path, Hub by-id sends them as query string, a 404 lands
as the serialized error; expandReferences=true reaches find / findOne / findOwn and a plain read
sends none, a 056 refusal lands as the serialized error, updateOne carries arrayFilters.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Step 5 of docs/tasks/schema-content-react-redux.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

🚀 Release preview

Next version on merge to main: none

semantic-release dry-run output
[10:14:19 AM] [semantic-release] › ℹ  Running semantic-release version 25.0.9
[10:14:19 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/npm"
[10:14:19 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/github"
[10:14:19 AM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[10:14:19 AM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[10:14:19 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/npm"
[10:14:19 AM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/npm"
[10:14:19 AM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/github"
[10:14:19 AM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[10:14:19 AM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[10:14:19 AM] [semantic-release] › ✔  Loaded plugin "success" from "@semantic-release/github"
[10:14:19 AM] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[10:14:20 AM] [semantic-release] › ℹ  This test run was triggered on the branch refs/pull/43/merge, while semantic-release is configured to only publish from main, therefore a new version won’t be published.

If next_version is none, your commits don't trigger a release. Use feat: for minor (breaking changes too, until launch), fix: / perf: for patch.

Dev dependency ^4.14.0 and peer range >=4.14.0: the release carries
files.getFileById and the typed expandReferences / arrayFilters fields that
the hooks on this branch use, so the checks no longer run against 4.11.0.
The lockfile also moves source-map-js to 1.2.2 (GHSA-68fv-2mgg-jv7q) and the
bundled npm CLI to 11.21.0. Task file: plan steps 7 and 8, the Needs-you line
for the remaining OSV finding on the bundled postcss-selector-parser.

Co-Authored-By: Claude Fable 5.1 <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