> ## 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.

# AccountActivityClient

> Referência para a classe AccountActivityClient no SDK TypeScript da X API. Métodos, parâmetros e tipos de retorno para os endpoints account activity da X API v2.

Client para operações de account activity

Este client fornece métodos para interagir com os endpoints account activity
da X API. Ele cuida da autenticação, formatação de requisição e análise
de resposta para todas as operações relacionadas a account activity.

## Construtores

### constructor

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

Cria uma nova instância do client account activity

#### Parâmetros

| Nome     | Tipo                                                  | Descrição                                |
| :------- | :---------------------------------------------------- | :--------------------------------------- |
| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | A instância principal do client da X API |

#### Retorna

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

#### Definido em

[account\_activity/client.ts:70](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L70)

## Métodos

### getSubscriptions

▸ **getSubscriptions**(`webhookId`, `options`): `Promise`\<`Response`>

Get subscriptions
Retrieves a list of all active subscriptions for a given webhook.

#### Parâmetros

| Nome                         | Tipo     | Descrição                                 |
| :--------------------------- | :------- | :---------------------------------------- |
| `webhookId`                  | `string` | The webhook ID to pull subscriptions for. |
| `options`                    | `Object` | -                                         |
| `options.requestOptions`     | `Object` | -                                         |
| `options.requestOptions.raw` | `true`   | -                                         |

#### Retorna

`Promise`\<`Response`>

Promise que resolve para a resposta da API, ou Response bruto se requestOptions.raw for true

#### Definido em

[account\_activity/client.ts:115](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L115)

▸ **getSubscriptions**(`webhookId`): `Promise`\<[`SubscriptionsListGetResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsListGetResponse)>

#### Parâmetros

| Nome        | Tipo     |
| :---------- | :------- |
| `webhookId` | `string` |

#### Retorna

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

#### Definido em

[account\_activity/client.ts:128](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L128)

***

### deleteSubscription

▸ **deleteSubscription**(`webhookId`, `userId`, `options`): `Promise`\<`Response`>

Delete subscription
Deletes an Account Activity subscription for the given webhook and user ID.

#### Parâmetros

| Nome                         | Tipo     | Descrição                                     |
| :--------------------------- | :------- | :-------------------------------------------- |
| `webhookId`                  | `string` | The webhook ID to check subscription against. |
| `userId`                     | `string` | User ID to unsubscribe from.                  |
| `options`                    | `Object` | -                                             |
| `options.requestOptions`     | `Object` | -                                             |
| `options.requestOptions.raw` | `true`   | -                                             |

#### Retorna

`Promise`\<`Response`>

Promise que resolve para a resposta da API, ou Response bruto se requestOptions.raw for true

#### Definido em

[account\_activity/client.ts:217](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L217)

▸ **deleteSubscription**(`webhookId`, `userId`): `Promise`\<[`SubscriptionsDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsDeleteResponse)>

#### Parâmetros

| Nome        | Tipo     |
| :---------- | :------- |
| `webhookId` | `string` |
| `userId`    | `string` |

#### Retorna

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

#### Definido em

[account\_activity/client.ts:234](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L234)

***

### validateSubscription

▸ **validateSubscription**(`webhookId`, `options`): `Promise`\<`Response`>

Validate subscription
Checks a user’s Account Activity subscription for a given webhook.

#### Parâmetros

| Nome                         | Tipo     | Descrição                                     |
| :--------------------------- | :------- | :-------------------------------------------- |
| `webhookId`                  | `string` | The webhook ID to check subscription against. |
| `options`                    | `Object` | -                                             |
| `options.requestOptions`     | `Object` | -                                             |
| `options.requestOptions.raw` | `true`   | -                                             |

#### Retorna

`Promise`\<`Response`>

Promise que resolve para a resposta da API, ou Response bruto se requestOptions.raw for true

#### Definido em

[account\_activity/client.ts:331](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L331)

▸ **validateSubscription**(`webhookId`): `Promise`\<[`SubscriptionsGetResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsGetResponse)>

#### Parâmetros

| Nome        | Tipo     |
| :---------- | :------- |
| `webhookId` | `string` |

#### Retorna

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

#### Definido em

[account\_activity/client.ts:344](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L344)

***

### createSubscription

▸ **createSubscription**(`webhookId`, `options`): `Promise`\<`Response`>

Create subscription
Creates an Account Activity subscription for the user and the given webhook.

#### Parâmetros

| Nome        | Tipo                                                                      | Descrição                                     |
| :---------- | :------------------------------------------------------------------------ | :-------------------------------------------- |
| `webhookId` | `string`                                                                  | The webhook ID to check subscription against. |
| `options`   | `CreateSubscriptionOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                                             |

#### Retorna

`Promise`\<`Response`>

Promise que resolve para a resposta da API, ou Response bruto se requestOptions.raw for true

#### Definido em

[account\_activity/client.ts:435](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L435)

▸ **createSubscription**(`webhookId`, `options?`): `Promise`\<[`SubscriptionsCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCreateResponse)>

#### Parâmetros

| Nome        | Tipo                        |
| :---------- | :-------------------------- |
| `webhookId` | `string`                    |
| `options?`  | `CreateSubscriptionOptions` |

#### Retorna

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

#### Definido em

[account\_activity/client.ts:448](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L448)

***

### createReplayJob

▸ **createReplayJob**(`webhookId`, `fromDate`, `toDate`, `options`): `Promise`\<`Response`>

Create replay job
Creates a replay job to retrieve activities from up to the past 5 days for all subscriptions associated with a given webhook.

#### Parâmetros

| Nome                         | Tipo     | Descrição                                                                                                     |
| :--------------------------- | :------- | :------------------------------------------------------------------------------------------------------------ |
| `webhookId`                  | `string` | The unique identifier for the webhook configuration.                                                          |
| `fromDate`                   | `string` | The oldest (starting) UTC timestamp (inclusive) from which events will be provided, in `yyyymmddhhmm` format. |
| `toDate`                     | `string` | The latest (ending) UTC timestamp (exclusive) up to which events will be provided, in `yyyymmddhhmm` format.  |
| `options`                    | `Object` | -                                                                                                             |
| `options.requestOptions`     | `Object` | -                                                                                                             |
| `options.requestOptions.raw` | `true`   | -                                                                                                             |

#### Retorna

`Promise`\<`Response`>

Promise que resolve para a resposta da API, ou Response bruto se requestOptions.raw for true

#### Definido em

[account\_activity/client.ts:564](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L564)

▸ **createReplayJob**(`webhookId`, `fromDate`, `toDate`): `Promise`\<[`ReplayJobCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse)>

#### Parâmetros

| Nome        | Tipo     |
| :---------- | :------- |
| `webhookId` | `string` |
| `fromDate`  | `string` |
| `toDate`    | `string` |

#### Retorna

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

#### Definido em

[account\_activity/client.ts:585](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L585)

***

### getSubscriptionCount

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

Get subscription count
Retrieves a count of currently active Account Activity subscriptions.

#### Parâmetros

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

#### Retorna

`Promise`\<`Response`>

Promise que resolve para a resposta da API, ou Response bruto se requestOptions.raw for true

#### Definido em

[account\_activity/client.ts:704](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L704)

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

#### Retorna

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

#### Definido em

[account\_activity/client.ts:713](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L713)
