feat(docs): add JavaScript/TypeScript SDK quickstart#241
Conversation
Replace the placeholder JS/TS quickstart with a full guide mirroring the Go quickstart structure: prerequisites, project setup, basic encrypt/decrypt, ABAC policy management, and a complete reference implementation. Update the SDK quickstart index card from "coming soon" to active link. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the developer experience for JavaScript/TypeScript users by introducing a detailed and comprehensive quickstart guide for the OpenTDF SDK. This guide moves beyond basic setup to include advanced features like Attribute-Based Access Control (ABAC), file handling, and streaming, providing a robust foundation for integrating secure data protection into applications. Concurrently, the underlying API specifications have been updated to reflect the latest platform capabilities. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a valuable JavaScript/TypeScript SDK quickstart guide and updates several OpenAPI specifications. The new guide is a great addition for developers. My review focuses on the code examples within this new documentation. I've pointed out a couple of areas where the examples could be improved for robustness and efficiency. Specifically, the pattern for creating resources if they don't already exist can be made more efficient, and the final complete code example has a minor bug in its logic for ensuring an attribute value exists. Fixing these points will enhance the quickstart experience for new users.
|
📄 Preview deployed to https://opentdf-docs-pr-241.surge.sh |
- Replace listNamespaces + filter with getNamespace by FQN for direct lookup when namespace already exists - Add missing 'marketing' value creation in Step 6 complete example when attribute exists but value doesn't Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The SDK logs a NetworkError about missing BaseKey in WellKnownConfiguration during encryption. This is harmless — it falls back to the legacy KAS public key endpoint. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PlatformClient requires DPoP keys bound to the auth provider before making API calls. OpenTDF generates these keys but only binds them lazily during encrypt/decrypt — so explicit binding is needed when PlatformClient is used before any TDF operation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflict in platform-client.mdx and replace manual updateClientPublicKey workaround with the new `await client.ready` pattern from opentdf/web-sdk#883 across all JS/TS code samples. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Change Node.js prerequisite to "Node.js LTS" with link - Clarify SDK supports both ESM and CommonJS Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
QA
OpenTDFmust be constructed beforePlatformClient)createTDFconfirmed in SDK source (ships in next release; currently delegates tocreateZTDF)Note
The quickstart targets the next
@opentdf/sdkrelease which exportscreateTDF. Current npm 0.4.0 only hascreateZTDF.Test plan
npm run buildpassesnpm run startdev server🤖 Generated with Claude Code