# TSDocs / JSDocs

All `@mitter-io` packages publish generated documentation for their source. The links for the same are listed below:

**NOTE** `@mitter-io/web` package includes breaking changes that currently render all versions prior to AND including `0.5.10` in a non-working state. Please update your web package to `0.5.11-1` for all dependant packages.

| Package                                                                                     | Link to latest                                                                                                   | Other versions                                                                                                                                                                                                  |
| ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **@mitter-io/core**[`npm🔗`](https://www.npmjs.com/package/@mitter-io/core)                 | [latest](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/core/latest/index.html)         | [0.5.10](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/sdk-core/0.5.10/index.html), [0.6.32](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/core/0.6.32/index.html)\*   |
| **@mitter-io/web**[`npm🔗`](https://www.npmjs.com/package/@mitter-io/web)                   | [latest](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/web/latest/index.html)          | [0.5.11-1](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/sdk-web/0.5.11-1/index.html), [0.6.32](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/web/0.6.32/index.html)\* |
| **@mitter-io/node**[`npm🔗`](https://www.npmjs.com/package/@mitter-io/node)                 | [latest](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/node/latest/index.html)         | [0.5.10](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/sdk-node/0.5.10/index.html), [0.6.32](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/node/0.6.32/index.html)\*   |
| **@mitter-io/models**[`npm🔗`](https://www.npmjs.com/package/@mitter-io/models)             | [latest](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/models/latest/index.html)       | [0.5.10](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/models/0.5.10/index.html), [0.6.32](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/models/0.6.32/index.html)\*   |
| **@mitter-io/react-native**[`npm🔗`](https://www.npmjs.com/package/@mitter-io/react-native) | [latest](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/react-native/latest/index.html) | [0.6.32](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/react-native/0.6.32/index.html)\*                                                                                              |
| **@mitter-io/react-scl**[`npm🔗`](https://www.npmjs.com/package/@mitter-io/react-scl)       | [latest](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/react-scl/latest/index.html)    | [0.6.32](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/react-scl/0.6.32/index.html)\*                                                                                                 |

&#x20;\* *Latest version*

### **Using the docs**

The `@mitter-io/models` contains the shape for all of the objects used across the SDK. When facing a method signature/class definition, any referring types usually can be found in the `models` package. For example, in `@mitter-io/core`, in the [`getMessages`](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/core/latest/classes/messagesclient.html#sendmessage) call the doc looks like:

![](/files/-LOXcpfrndDtXqX3XTJD)

\
The referring type `ChannelReferencingMessage` can be found in the `@mitter-io/models` docs for [`ChannelReferencingMessage`](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/models/latest/classes/channelreferencingmessage.html).

Usually, you'd get an instance of type or an extension of `MitterBase` (as defined in `@mitter-io/core`) by using one of the static methods for your platform:

{% tabs %}
{% tab title="node.js" %}

```
import { Mitter } from '@mitter-io/node'

const mitter = Mitter.forNode('.. application id',
    {
        accessKey: '..your access key..',
        accessSecret: '..your access secret..'
    }
)

```

The documentation for the `forNode` function can be found [here](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/node/latest/globals.html#mitter)
{% endtab %}

{% tab title="web" %}

```
import { Mitter } from '@mitter-io/web'

const mitter = Mitter.forWeb('.. your application id ..')

```

The `forWeb` method is documented [here](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/web/latest/globals.html#mitter)
{% endtab %}

{% tab title="react-native" %}

```
import { Mitter } from '@mitter-io/react-native'

const mitter = Mitter.forReactNative('.. your application id ..')

```

The `forReactNative` method is documented [here](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/react-native/latest/globals.html#mitter)
{% endtab %}
{% endtabs %}

Both the methods as shown above return a platform specific extension of `MitterBase` which is defined in `@mitter-io/core`. The exact operations available based on the platform can be referred here:

1. For node.js - `MitterBase` [Reference TSDocs](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/core/latest/classes/mitterbase.html)
2. For web and react-native - `Mitter` [Reference TSDocs](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/core/latest/classes/mitter.html)

Specific clients can be fetched on both of these objects using the `Mitter.clients()` method which returns a `MitterClientSet` from which different clients can fetched for performing mitter.io API calls. You can refer the *methods* section in [this page](https://s3.ap-south-1.amazonaws.com/mitter-sourcedocs/tsdocs/@mitter-io/core/latest/classes/mitterclientset.html) to get a list of clients that are returned by the client set.

> **NOTE** We currently do not automatically hyperlink types across the different packages. We are working on a solution towards this problem and will try to publish the new docs with hyperlinks soon. We apologize for the inconvenience.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mitter.io/sdks/web/tsdocs-jsdocs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
