Skip to main content

README, API Reference, SDK Map and Context Plugin for TypeScript v4 SDKs (Beta)

· 2 min read

TypeScript v4 SDKs now ship with their documentation and with a context plugin. A README.md gets a developer started, api-reference.md documents every operation, sdk-map.md with a page per resource indexes the package, and the plugin skills teach AI coding tools how to use it.

Details​

The README covers installation from npm or from the SDK source, constructing the client with a placeholder credential for every declared authentication scheme, and the CommonJS form. The API reference documents each operation with a sample for awaiting it and for the non-throwing .asApiResult() form, a description of every parameter, and the success and error types it resolves or rejects with.

The SDK map is a lookup index of the TypeScript surface: client construction, the client options, servers and auth, the error-handling model, and one page per resource giving each operation's signature, route, request fields and the file behind every type. The context plugin wraps it with two skills generated from your API, an integration skill and a getting-started skill, beside the API-agnostic companions that cover client construction, authentication, calling endpoints, models, error handling, configuration and testing.

Usage Example​

The documentation lands at the root of the generated package, and the skills land in the context plugin:

payments/                                   # the generated npm package
├── README.md # install and construct the client
├── api-reference.md # every operation, with samples
├── sdk-map.md # index of the whole TypeScript surface
├── map/
│ └── operations/
│ ├── payments.md # one page per resource
│ └── invoices.md
├── package.json
└── src/

plugin/
└── skills/
└── typescript/
├── typescript-integrate-payments/SKILL.md
├── typescript-getting-started/SKILL.md
└── typescript-error-handling/SKILL.md # one of the companion skills

The README points to the SDK map first, so a reader or a coding assistant starts from the index rather than the source.

This feature is available in the TypeScript v4 SDK (beta). Generate it from the APIMatic CLI:

apimatic sdk generate --language=typescript --codegen-version=v4 --stability=beta

For the full set of flags and options, see the APIMatic CLI documentation.