- Support the most common use cases out of the box
- Provide clear error handling aligned with Lerian’s Error Model
- Include examples and tests for key functions
- Keep versions in sync with the plugin’s releases
Repository structure
Organize your SDK repository with a consistent layout:
README.md with installation instructions, a minimal usage example, and a link to the full documentation.
Naming conventions
Align package and module names with Lerian product names:
- Use lowercase for package names:
midaz,feesengine,tracer - Prefix with your organization name when publishing to registries:
@yourorg/midaz-plugin-sdk - Keep naming consistent across languages: if the Go module is
midaz-plugin-sdk, the npm package follows the same pattern
Versioning
Follow Semantic Versioning (semver):
- MAJOR — breaking changes to the SDK’s public API
- MINOR — new features, backward-compatible
- PATCH — bug fixes, backward-compatible
README.md.
Error handling
Wrap responses from the Lerian Error model into typed errors:
- Map each Lerian error code to a specific error type or class in your SDK
- Include the original error
code,message, anddetailsfields in the typed error - Provide helper methods for checking error types (e.g.,
IsNotFoundError()in Go,instanceof NotFoundErrorin TypeScript) - Never swallow errors silently — always propagate or wrap them with context
Minimum languages
Provide SDKs in at least these two languages:
| Language | Rationale |
|---|---|
| Go | Primary language of the Lerian backend stack |
| TypeScript | Primary language for frontend and Node.js integrations |

