> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ConnectionsClient

> Reference for the ConnectionsClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 connections endpoints.

Cliente para operaciones de connections

This client provides methods for interacting with the connections endpoints
of the X API. It handles authentication, request formatting, and response
parsing for all connections related operations.

## Constructores

### constructor

• **new ConnectionsClient**(`client`): [`ConnectionsClient`](/xdks/typescript/reference/classes/ConnectionsClient)

Creates a new connections client instance

#### Parámetros

| Nombre   | Tipo                                                  | Descripción                    |
| :------- | :---------------------------------------------------- | :----------------------------- |
| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance |

#### Devuelve

[`ConnectionsClient`](/xdks/typescript/reference/classes/ConnectionsClient)

#### Definido en

[connections/client.ts:88](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/client.ts#L88)

## Métodos

### getConnectionHistory

▸ **getConnectionHistory**(`options`): `Promise`\<`Response`>

Get Connection History
Returns active and historical streaming connections with disconnect reasons for the authenticated application.

#### Parámetros

| Nombre    | Tipo                                                                        |
| :-------- | :-------------------------------------------------------------------------- |
| `options` | `GetConnectionHistoryOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### Devuelve

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Definido en

[connections/client.ts:129](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/client.ts#L129)

▸ **getConnectionHistory**(`options?`): `Promise`\<[`Get2ConnectionsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ConnectionsResponse)>

#### Parámetros

| Nombre     | Tipo                          |
| :--------- | :---------------------------- |
| `options?` | `GetConnectionHistoryOptions` |

#### Devuelve

`Promise`\<[`Get2ConnectionsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ConnectionsResponse)>

#### Definido en

[connections/client.ts:138](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/client.ts#L138)

***

### deleteAll

▸ **deleteAll**(`options`): `Promise`\<`Response`>

Terminate all connections
Terminates all active streaming connections for the authenticated application.

#### Parámetros

| Nombre                       | Tipo     |
| :--------------------------- | :------- |
| `options`                    | `Object` |
| `options.requestOptions`     | `Object` |
| `options.requestOptions.raw` | `true`   |

#### Devuelve

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Definido en

[connections/client.ts:318](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/client.ts#L318)

▸ **deleteAll**(): `Promise`\<[`KillAllConnectionsResponse`](/xdks/typescript/reference/interfaces/Schemas.KillAllConnectionsResponse)>

#### Devuelve

`Promise`\<[`KillAllConnectionsResponse`](/xdks/typescript/reference/interfaces/Schemas.KillAllConnectionsResponse)>

#### Definido en

[connections/client.ts:327](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/client.ts#L327)
