Open History to see the last commit
1---
2id: ApprovalRequestedEvent
3title: ApprovalRequestedEvent
4---
5
6Defined in: [packages/ai/src/types.ts:1468](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1468)
7
8## Deprecated
9
10Native interrupts use RUN_FINISHED interrupt outcomes. This
11compatibility event remains readable until 1.0.
12
13## Extends
14
15- [`CustomEvent`](CustomEvent.md)
16
17## Properties
18
19### ~~metadata?~~
20
21```ts
22optional metadata?: Record<string, any>;
23```
24
25Defined in: [packages/ai/src/types.ts:1416](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1416)
26
27Extra information attached to this event.
28
29#### Inherited from
30
31[`CustomEvent`](CustomEvent.md).[`metadata`](CustomEvent.md#metadata)
32
33***
34
35### ~~name~~
36
37```ts
38name: "approval-requested";
39```
40
41Defined in: [packages/ai/src/types.ts:1469](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1469)
42
43What this custom event is. Required: without it a consumer cannot route
44the value.
45
46#### Overrides
47
48```ts
49CustomEvent.name
50```
51
52***
53
54### ~~type~~
55
56```ts
57type: "CUSTOM";
58```
59
60Defined in: [packages/ai/src/types.ts:1415](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1415)
61
62#### Inherited from
63
64[`CustomEvent`](CustomEvent.md).[`type`](CustomEvent.md#type)
65
66***
67
68### ~~value~~
69
70```ts
71value: object;
72```
73
74Defined in: [packages/ai/src/types.ts:1470](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1470)
75
76The payload. Any JSON value, and required.
77
78#### ~~approval~~
79
80```ts
81approval: object;
82```
83
84##### approval.id
85
86```ts
87id: string;
88```
89
90##### approval.needsApproval
91
92```ts
93needsApproval: true;
94```
95
96#### ~~input~~
97
98```ts
99input: unknown;
100```
101
102#### ~~toolCallId~~
103
104```ts
105toolCallId: string;
106```
107
108#### ~~toolName~~
109
110```ts
111toolName: string;
112```
113
114#### Overrides
115
116```ts
117CustomEvent.value
118```