feat(sdk): expose ContentIdentity on write types#57
Merged
Conversation
PR #54 added contentIdentity to @relayfile/core but the TypeScript client SDK never picked it up. Consumers (sage, nightcto, msd) were hacking around this with local .d.ts shims. Add the field to FileWriteRequest, BulkWriteFile, and WriteFileInput, export ContentIdentity from the public surface, and forward it on PUT body. 0.3.0 → 0.3.1 (additive, no breakage for omitting callers). Co-Authored-By: Claude Opus 4.7 (1M context) <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
PR #54 landed
contentIdentityin@relayfile/coreand bumped to v0.3.0, but the TS client SDK never exposed it onFileWriteRequest/BulkWriteFile/WriteFileInput. Consumers (sage, nightcto, msd) have been working around this with local.d.tsshims — see e.g. sage #89'ssrc/relayfile-sdk.d.ts.This PR:
ContentIdentity { kind: string; key: string }to the SDK's typescontentIdentitytoFileWriteRequest,BulkWriteFile,WriteFileInputclient.writeFile()ContentIdentityfrom the public surface@relayfile/sdkto 0.3.1Fully additive, no breakage for callers that omit the field.
Test plan
npm run typecheckpassesnpm testpasses (46/46, incl. two new tests for forward + omit cases).d.tsshims on a follow-upRelated: #54, platform-v1 runbook (sage#84)