noibu-metroplex-ts-bindings v1.0.34
Metroplex TypeScript Bindings
Metroplex TypeScript Bindings is a library providing TypeScript typings for clients interacting with the Metroplex Rust service. It simplifies development by ensuring strong type support for the Metroplex API and websocket connections.
Table of Contents
Installation
Install the package using npm:
npm install @noibu/metroplex-ts-bindingsor with yarn:
yarn add @noibu/metroplex-ts-bindingsUsage
This package provides TypeScript typings for Metroplex endpoints. To use them:
- Create or edit any
.d.tsfile and add:import "@noibu/metroplex-ts-bindings"; - Update your tsconfig.json to include the .d.ts file:
{ "include": ["path/to/your/file.d.ts"] }
Endpoints
POST Endpoints
These endpoints accept POST requests and require specific payloads:
Collect Error (
CollectError.d.ts): Typings for submitting error data.Metrics (
PageVisitMetrics.d.ts): Typings for sending metrics data.Page Visit (
CompletePageVisitPart.d.ts): Typings for complete page visit parts.
WebSocket Endpoint
- Page Visit Part (
_pvPart.d.ts): Typings for handling WebSocket messages.
Contributing
Contributions are welcome! To get started:
Clone the repository:
git clone https://gitlab.com/noibu/metroplex-ts-bindings.gitInstall dependencies:
npm installMake your changes and submit a pull request.
License
This project is licensed under the ISC License.
Links
- Repository: Metroplex TS Bindings
- Issues: Report Issues
- Homepage: Metroplex TS Bindings Documentation