1.0.34 • Published 4 months ago

noibu-metroplex-ts-bindings v1.0.34

Weekly downloads
-
License
ISC
Repository
-
Last release
4 months ago

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-bindings

or with yarn:

yarn add @noibu/metroplex-ts-bindings

Usage

This package provides TypeScript typings for Metroplex endpoints. To use them:

  1. Create or edit any .d.ts file and add:
    import "@noibu/metroplex-ts-bindings";
  2. 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:

  1. Clone the repository:

    git clone https://gitlab.com/noibu/metroplex-ts-bindings.git
  2. Install dependencies:

    npm install
  3. Make your changes and submit a pull request.

License

This project is licensed under the ISC License.

Links

1.0.34

4 months ago

1.0.33

5 months ago

1.0.32

5 months ago

1.0.31

5 months ago

1.0.30

5 months ago

1.0.29

6 months ago

1.0.28

6 months ago

1.0.27

6 months ago