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

# WebhooksClient

webhooks 操作用の Client

この Client は、X API の webhooks エンドポイントとやり取りするためのメソッドを提供します。webhooks に関連するすべての操作について、認証、リクエストのフォーマット、レスポンスのパースを処理します。

<div id="constructors">
  ## コンストラクタ
</div>

<div id="constructor">
  ### constructor
</div>

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

新しい `WebhooksClient` インスタンスを作成します

<div id="parameters">
  #### パラメーター
</div>

| 名前       | 型                                                        | 説明                       |
| :------- | :------------------------------------------------------- | :----------------------- |
| `client` | [`Client`](/ja/xdks/typescript/reference/classes/Client) | X API のメイン Client インスタンス |

#### 戻り値

[`WebhooksClient`](/ja/xdks/typescript/reference/classes/WebhooksClient)

#### 定義元

[webhooks/client.ts:162](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L162)

<div id="methods">
  ## メソッド
</div>

<div id="createstreamlink">
  ### createStreamLink
</div>

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

ストリームリンクを作成する\
指定した webhook に FilteredStream イベントを配信するためのリンクを作成します。

<div id="parameters">
  #### パラメーター
</div>

| Name        | Type                                                                    | Description                               |
| :---------- | :---------------------------------------------------------------------- | :---------------------------------------- |
| `webhookId` | `string`                                                                | FilteredStream ルールセットに関連付ける webhook の ID。 |
| `options`   | `CreateStreamLinkOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                                         |

#### 戻り値

`Promise`\<`Response`>

API レスポンスを解決する Promise、または requestOptions.raw が true の場合は生の Response

<div id="defined-in">
  #### 定義場所
</div>

[webhooks/client.ts:207](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L207)

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

<div id="parameters">
  #### パラメーター
</div>

| 名前          | 型                         |
| :---------- | :------------------------ |
| `webhookId` | `string`                  |
| `options?`  | `CreateStreamLinkOptions` |

#### 戻り値

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

#### 定義元

[webhooks/client.ts:220](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L220)

***

<div id="deletestreamlink">
  ### deleteStreamLink
</div>

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

ストリームリンクを削除します\
FilteredStream イベントと指定した webhook 間のリンクを削除します。

<div id="parameters">
  #### パラメーター
</div>

| 名前                           | 型        | 説明                                        |
| :--------------------------- | :------- | :---------------------------------------- |
| `webhookId`                  | `string` | FilteredStream ルールセットに関連付ける webhook の ID。 |
| `options`                    | `Object` | -                                         |
| `options.requestOptions`     | `Object` | -                                         |
| `options.requestOptions.raw` | `true`   | -                                         |

<div id="returns">
  #### Returns
</div>

`Promise`\<`Response`>

API レスポンス、または requestOptions.raw が true の場合は生の Response を返す Promise

#### 定義元

[webhooks/client.ts:433](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L433)

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

#### パラメータ

| 名前          | 型        |
| :---------- | :------- |
| `webhookId` | `string` |

#### 戻り値

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

#### 定義元

[webhooks/client.ts:446](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L446)

***

<div id="getstreamlinks">
  ### getStreamLinks
</div>

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

ストリームリンクの取得
フィルタ済みストリームルールセットに関連付けられた webhook リンクのリストを取得します。

<div id="parameters">
  #### パラメーター
</div>

| 名前                           | type     |
| :--------------------------- | :------- |
| `options`                    | `Object` |
| `options.requestOptions`     | `Object` |
| `options.requestOptions.raw` | `true`   |

#### 戻り値

`Promise`\<`Response`>

API レスポンスを返す `Promise`。`requestOptions.raw` が `true` の場合は生の `Response` を返します。

<div id="defined-in">
  #### 定義場所
</div>

[webhooks/client.ts:527](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L527)

▸ **getStreamLinks**(): `Promise`\<[`WebhookLinksGetResponse`](/ja/xdks/typescript/reference/interfaces/Schemas.WebhookLinksGetResponse)>

#### 戻り値

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

#### 定義元

[webhooks/client.ts:536](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L536)

***

<div id="createwebhookreplayjob">
  ### createWebhookReplayJob
</div>

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

Webhook のリプレイジョブを作成します
Webhook に対して配信された、または配信が試行されたすべてのイベントについて、過去最大 24 時間分のイベントを取得するリプレイジョブを作成します。

<div id="parameters">
  #### パラメーター
</div>

| 名前        | type                                                                          |
| :-------- | :---------------------------------------------------------------------------- |
| `options` | `CreateWebhookReplayJobOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### 戻り値

`Promise`\<`Response`>

API レスポンスで解決される Promise、または requestOptions.raw が true の場合は生の Response

<div id="defined-in">
  #### 定義場所
</div>

[webhooks/client.ts:605](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L605)

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

#### パラメータ

| 名前         | type                            |
| :--------- | :------------------------------ |
| `options?` | `CreateWebhookReplayJobOptions` |

#### 戻り値

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

#### 定義元

[webhooks/client.ts:614](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L614)

***

<div id="validate">
  ### validate
</div>

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

webhook を検証します。
指定された webhook に対して CRC チェックを実行します。

<div id="parameters">
  #### パラメーター
</div>

| Name                         | Type     | Description         |
| :--------------------------- | :------- | :------------------ |
| `webhookId`                  | `string` | 検証対象の webhook の ID。 |
| `options`                    | `Object` | -                   |
| `options.requestOptions`     | `Object` | -                   |
| `options.requestOptions.raw` | `true`   | -                   |

<div id="returns">
  #### Returns
</div>

`Promise`\<`Response`>

API レスポンスを返す Promise。`requestOptions.raw` が true の場合は生の `Response`

#### 定義元

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

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

#### パラメータ

| 名前          | 型        |
| :---------- | :------- |
| `webhookId` | `string` |

#### 戻り値

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

#### 定義箇所

[webhooks/client.ts:717](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L717)

***

<div id="delete">
  ### delete
</div>

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

webhook を削除します\
既存の webhook 設定を削除します。

<div id="parameters">
  #### パラメーター
</div>

| Name                         | Type     | Description        |
| :--------------------------- | :------- | :----------------- |
| `webhookId`                  | `string` | 削除する webhook の ID。 |
| `options`                    | `Object` | -                  |
| `options.requestOptions`     | `Object` | -                  |
| `options.requestOptions.raw` | `true`   | -                  |

<div id="returns">
  #### Returns
</div>

`Promise`\<`Response`>

API レスポンスで解決される `Promise`。`requestOptions.raw` が `true` の場合は生の `Response` を返す

<div id="defined-in">
  #### 定義場所
</div>

[webhooks/client.ts:808](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L808)

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

#### パラメータ

| 名前          | 型        |
| :---------- | :------- |
| `webhookId` | `string` |

#### 戻り値

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

#### 定義元

[webhooks/client.ts:821](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L821)

***

<div id="get">
  ### get
</div>

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

webhook の取得
クライアント App に関連付けられている webhook 設定のリストを取得します。

<div id="parameters">
  #### パラメーター
</div>

| 名前        | type                                                       |
| :-------- | :--------------------------------------------------------- |
| `options` | `GetOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

<div id="returns">
  #### Returns
</div>

`Promise`\<`Response`>

API レスポンスを返す Promise。requestOptions.raw が true の場合は生の Response。

<div id="defined-in">
  #### 定義場所
</div>

[webhooks/client.ts:908](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L908)

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

#### パラメータ

| 名前         | type         |
| :--------- | :----------- |
| `options?` | `GetOptions` |

#### 戻り値

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

<div id="defined-in">
  #### 定義場所
</div>

[webhooks/client.ts:917](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L917)

***

<div id="create">
  ### create
</div>

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

Webhook を作成
新しい webhook 構成を作成します。

#### パラメータ

| 名前        | type                                                          |
| :-------- | :------------------------------------------------------------ |
| `options` | `CreateOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

<div id="returns">
  #### Returns
</div>

`Promise`\<`Response`>

API レスポンスを返す Promise。requestOptions.raw が true の場合は生の Response を返します。

<div id="defined-in">
  #### 定義場所
</div>

[webhooks/client.ts:1023](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L1023)

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

#### パラメータ

| 名前         | type            |
| :--------- | :-------------- |
| `options?` | `CreateOptions` |

#### 戻り値

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

#### 定義元

[webhooks/client.ts:1032](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L1032)
