Closed AlwaysBCoding closed 5 months ago
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
Package | New capabilities | Transitives | Size | Publisher |
---|---|---|---|---|
npm/@types/elliptic@6.4.18 | None | +1 |
25.9 kB | types |
npm/@types/express@4.17.21 | None | +10 |
111 kB | types |
npm/@types/react@18.2.75 | None | +2 |
1.65 MB | types |
npm/elliptic@6.5.5 | None | +7 |
295 kB | indutny |
npm/glob@8.1.0 | filesystem Transitive: environment | +8 |
139 kB | isaacs |
Summary & Motivation
Motivation is to begin aggregating our javascript SDK libraries into a single importable SDK with nicer user abstractions for calling common Turnkey API functionality
Structure
This PR introduces a new package called
sdk-js
into thepackages/
folder. The package requires two__inputs__
which are the copiedpublic_api.swagger.json
file and thepublic_api.types.json
from themono
repo.There is a single script
node scripts/codegen.js
which will generate the base sdk client and associated types and save it in the__generated__
folder.Finally there is a top-level
sdk-client.ts
file that will contain the exported SDK client and the ability to create synthetic methods for users to interact with that are abstractions on top of just calling the underlying generated API methods.What is different than the existing base HTTP Client