|
1 | 1 | # Replay |
2 | 2 |
|
| 3 | +### AddSessionIndicatorOptions |
| 4 | + |
| 5 | +> **AddSessionIndicatorOptions** = `object` |
| 6 | +
|
| 7 | +Visual indicator displayed next to a session label in the replay tree component. |
| 8 | +Includes an icon and an associated description. |
| 9 | + |
| 10 | +#### Properties |
| 11 | + |
| 12 | +##### description |
| 13 | + |
| 14 | +> **description**: `string` |
| 15 | +
|
| 16 | +##### icon |
| 17 | + |
| 18 | +> **icon**: `string` |
| 19 | +
|
| 20 | +*** |
| 21 | + |
3 | 22 | ### CurrentReplaySessionChangeEvent |
4 | 23 |
|
5 | 24 | > **CurrentReplaySessionChangeEvent** = `object` |
@@ -145,6 +164,38 @@ Add a custom view mode for requests. |
145 | 164 |
|
146 | 165 | `void` |
147 | 166 |
|
| 167 | +##### addSessionIndicator() |
| 168 | + |
| 169 | +> **addSessionIndicator**: (`sessionId`: [`ID`](utils.md#id), `indicator`: [`AddSessionIndicatorOptions`](#addsessionindicatoroptions)) => [`SessionIndicator`](#sessionindicator) |
| 170 | +
|
| 171 | +Add an indicator to a replay session. |
| 172 | +Indicators are displayed next to the session name in the collections tree. |
| 173 | + |
| 174 | +###### Parameters |
| 175 | + |
| 176 | +| Parameter | Type | Description | |
| 177 | +| ------ | ------ | ------ | |
| 178 | +| `sessionId` | [`ID`](utils.md#id) | The ID of the session to add the indicator to. | |
| 179 | +| `indicator` | [`AddSessionIndicatorOptions`](#addsessionindicatoroptions) | The indicator configuration. | |
| 180 | + |
| 181 | +###### Returns |
| 182 | + |
| 183 | +[`SessionIndicator`](#sessionindicator) |
| 184 | + |
| 185 | +A handle object with a `remove` method to remove the indicator. |
| 186 | + |
| 187 | +###### Example |
| 188 | + |
| 189 | +```ts |
| 190 | +const indicator = sdk.replay.addSessionIndicator(sessionId, { |
| 191 | + icon: "fas fa-exclamation-triangle", |
| 192 | + description: "Security warning", |
| 193 | +}); |
| 194 | + |
| 195 | +// Later, remove the indicator |
| 196 | +indicator.remove(); |
| 197 | +``` |
| 198 | + |
148 | 199 | ##### addToSlot |
149 | 200 |
|
150 | 201 | > **addToSlot**: [`DefineAddToSlotFn`](slots.md#defineaddtoslotfn)\<[`ReplaySlotContent`](other.md#replayslotcontent)\> |
@@ -746,6 +797,24 @@ Defaults to true. |
746 | 797 |
|
747 | 798 | *** |
748 | 799 |
|
| 800 | +### SessionIndicator |
| 801 | + |
| 802 | +> **SessionIndicator** = `object` |
| 803 | +
|
| 804 | +Providing operations that can be performed on a session indicator. |
| 805 | + |
| 806 | +#### Properties |
| 807 | + |
| 808 | +##### remove() |
| 809 | + |
| 810 | +> **remove**: () => `void` |
| 811 | +
|
| 812 | +###### Returns |
| 813 | + |
| 814 | +`void` |
| 815 | + |
| 816 | +*** |
| 817 | + |
749 | 818 | ### ReplaySlot |
750 | 819 |
|
751 | 820 | > `const` **ReplaySlot**: `object` |
|
0 commit comments