@roarkanalytics/sdk 7.9.0 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +20 -5
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +20 -5
  5. package/client.d.ts.map +1 -1
  6. package/client.js +18 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +18 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent-connection.d.mts +1952 -0
  12. package/resources/agent-connection.d.mts.map +1 -0
  13. package/resources/agent-connection.d.ts +1952 -0
  14. package/resources/agent-connection.d.ts.map +1 -0
  15. package/resources/agent-connection.js +173 -0
  16. package/resources/agent-connection.js.map +1 -0
  17. package/resources/agent-connection.mjs +169 -0
  18. package/resources/agent-connection.mjs.map +1 -0
  19. package/resources/agent-conversation.d.mts +110 -0
  20. package/resources/agent-conversation.d.mts.map +1 -0
  21. package/resources/agent-conversation.d.ts +110 -0
  22. package/resources/agent-conversation.d.ts.map +1 -0
  23. package/resources/agent-conversation.js +41 -0
  24. package/resources/agent-conversation.js.map +1 -0
  25. package/resources/agent-conversation.mjs +37 -0
  26. package/resources/agent-conversation.mjs.map +1 -0
  27. package/resources/agent-draft.d.mts +101 -35
  28. package/resources/agent-draft.d.mts.map +1 -1
  29. package/resources/agent-draft.d.ts +101 -35
  30. package/resources/agent-draft.d.ts.map +1 -1
  31. package/resources/agent-endpoint.d.mts +4 -4
  32. package/resources/agent-endpoint.d.mts.map +1 -1
  33. package/resources/agent-endpoint.d.ts +4 -4
  34. package/resources/agent-endpoint.d.ts.map +1 -1
  35. package/resources/agent-setup.d.mts +1057 -0
  36. package/resources/agent-setup.d.mts.map +1 -0
  37. package/resources/agent-setup.d.ts +1057 -0
  38. package/resources/agent-setup.d.ts.map +1 -0
  39. package/resources/agent-setup.js +113 -0
  40. package/resources/agent-setup.js.map +1 -0
  41. package/resources/agent-setup.mjs +109 -0
  42. package/resources/agent-setup.mjs.map +1 -0
  43. package/resources/agent-version.d.mts +57 -18
  44. package/resources/agent-version.d.mts.map +1 -1
  45. package/resources/agent-version.d.ts +57 -18
  46. package/resources/agent-version.d.ts.map +1 -1
  47. package/resources/agent.d.mts +263 -4
  48. package/resources/agent.d.mts.map +1 -1
  49. package/resources/agent.d.ts +263 -4
  50. package/resources/agent.d.ts.map +1 -1
  51. package/resources/calendar-connection.d.mts +834 -56
  52. package/resources/calendar-connection.d.mts.map +1 -1
  53. package/resources/calendar-connection.d.ts +834 -56
  54. package/resources/calendar-connection.d.ts.map +1 -1
  55. package/resources/calendar-connection.js +127 -8
  56. package/resources/calendar-connection.js.map +1 -1
  57. package/resources/calendar-connection.mjs +127 -8
  58. package/resources/calendar-connection.mjs.map +1 -1
  59. package/resources/call.d.mts +2 -2
  60. package/resources/call.d.mts.map +1 -1
  61. package/resources/call.d.ts +2 -2
  62. package/resources/call.d.ts.map +1 -1
  63. package/resources/config.d.mts +78 -36
  64. package/resources/config.d.mts.map +1 -1
  65. package/resources/config.d.ts +78 -36
  66. package/resources/config.d.ts.map +1 -1
  67. package/resources/conversation.d.mts +156 -0
  68. package/resources/conversation.d.mts.map +1 -0
  69. package/resources/conversation.d.ts +156 -0
  70. package/resources/conversation.d.ts.map +1 -0
  71. package/resources/conversation.js +40 -0
  72. package/resources/conversation.js.map +1 -0
  73. package/resources/conversation.mjs +36 -0
  74. package/resources/conversation.mjs.map +1 -0
  75. package/resources/customer-flow-edge-case.d.mts +637 -40
  76. package/resources/customer-flow-edge-case.d.mts.map +1 -1
  77. package/resources/customer-flow-edge-case.d.ts +637 -40
  78. package/resources/customer-flow-edge-case.d.ts.map +1 -1
  79. package/resources/customer-flow.d.mts +2583 -156
  80. package/resources/customer-flow.d.mts.map +1 -1
  81. package/resources/customer-flow.d.ts +2583 -156
  82. package/resources/customer-flow.d.ts.map +1 -1
  83. package/resources/{customer-profile.d.mts → customer.d.mts} +287 -92
  84. package/resources/customer.d.mts.map +1 -0
  85. package/resources/{customer-profile.d.ts → customer.d.ts} +287 -92
  86. package/resources/customer.d.ts.map +1 -0
  87. package/resources/customer.js +180 -0
  88. package/resources/customer.js.map +1 -0
  89. package/resources/customer.mjs +176 -0
  90. package/resources/customer.mjs.map +1 -0
  91. package/resources/index.d.mts +7 -2
  92. package/resources/index.d.mts.map +1 -1
  93. package/resources/index.d.ts +7 -2
  94. package/resources/index.d.ts.map +1 -1
  95. package/resources/index.js +13 -3
  96. package/resources/index.js.map +1 -1
  97. package/resources/index.mjs +6 -1
  98. package/resources/index.mjs.map +1 -1
  99. package/resources/mcp-server.d.mts +588 -0
  100. package/resources/mcp-server.d.mts.map +1 -0
  101. package/resources/mcp-server.d.ts +588 -0
  102. package/resources/mcp-server.d.ts.map +1 -0
  103. package/resources/mcp-server.js +109 -0
  104. package/resources/mcp-server.js.map +1 -0
  105. package/resources/mcp-server.mjs +105 -0
  106. package/resources/mcp-server.mjs.map +1 -0
  107. package/resources/metric-policy.d.mts +5 -4
  108. package/resources/metric-policy.d.mts.map +1 -1
  109. package/resources/metric-policy.d.ts +5 -4
  110. package/resources/metric-policy.d.ts.map +1 -1
  111. package/resources/metric-policy.js +1 -1
  112. package/resources/metric-policy.mjs +1 -1
  113. package/resources/metric-variant.d.mts +4 -1
  114. package/resources/metric-variant.d.mts.map +1 -1
  115. package/resources/metric-variant.d.ts +4 -1
  116. package/resources/metric-variant.d.ts.map +1 -1
  117. package/resources/metric.d.mts +7 -2
  118. package/resources/metric.d.mts.map +1 -1
  119. package/resources/metric.d.ts +7 -2
  120. package/resources/metric.d.ts.map +1 -1
  121. package/resources/simulation-environment.d.mts +366 -0
  122. package/resources/simulation-environment.d.mts.map +1 -1
  123. package/resources/simulation-environment.d.ts +366 -0
  124. package/resources/simulation-environment.d.ts.map +1 -1
  125. package/resources/simulation-job.d.mts +12 -8
  126. package/resources/simulation-job.d.mts.map +1 -1
  127. package/resources/simulation-job.d.ts +12 -8
  128. package/resources/simulation-job.d.ts.map +1 -1
  129. package/resources/simulation-persona.d.mts +25 -15
  130. package/resources/simulation-persona.d.mts.map +1 -1
  131. package/resources/simulation-persona.d.ts +25 -15
  132. package/resources/simulation-persona.d.ts.map +1 -1
  133. package/resources/simulation-run-plan-job.d.mts +32 -6
  134. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  135. package/resources/simulation-run-plan-job.d.ts +32 -6
  136. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  137. package/resources/simulation-run-plan.d.mts +126 -13
  138. package/resources/simulation-run-plan.d.mts.map +1 -1
  139. package/resources/simulation-run-plan.d.ts +126 -13
  140. package/resources/simulation-run-plan.d.ts.map +1 -1
  141. package/resources/simulation-template.d.mts +1 -1
  142. package/resources/simulation-template.d.mts.map +1 -1
  143. package/resources/simulation-template.d.ts +1 -1
  144. package/resources/simulation-template.d.ts.map +1 -1
  145. package/resources/simulation.d.mts +35 -3
  146. package/resources/simulation.d.mts.map +1 -1
  147. package/resources/simulation.d.ts +35 -3
  148. package/resources/simulation.d.ts.map +1 -1
  149. package/resources/tool.d.mts +565 -6
  150. package/resources/tool.d.mts.map +1 -1
  151. package/resources/tool.d.ts +565 -6
  152. package/resources/tool.d.ts.map +1 -1
  153. package/resources/tool.js +9 -6
  154. package/resources/tool.js.map +1 -1
  155. package/resources/tool.mjs +9 -6
  156. package/resources/tool.mjs.map +1 -1
  157. package/resources/usage.d.mts +1 -1
  158. package/resources/usage.d.mts.map +1 -1
  159. package/resources/usage.d.ts +1 -1
  160. package/resources/usage.d.ts.map +1 -1
  161. package/resources/webhook.d.mts +4 -4
  162. package/resources/webhook.d.mts.map +1 -1
  163. package/resources/webhook.d.ts +4 -4
  164. package/resources/webhook.d.ts.map +1 -1
  165. package/src/client.ts +197 -34
  166. package/src/resources/agent-connection.ts +2523 -0
  167. package/src/resources/agent-conversation.ts +139 -0
  168. package/src/resources/agent-draft.ts +239 -35
  169. package/src/resources/agent-endpoint.ts +8 -4
  170. package/src/resources/agent-setup.ts +1685 -0
  171. package/src/resources/agent-version.ts +126 -18
  172. package/src/resources/agent.ts +506 -4
  173. package/src/resources/calendar-connection.ts +1035 -63
  174. package/src/resources/call.ts +12 -2
  175. package/src/resources/config.ts +198 -36
  176. package/src/resources/conversation.ts +205 -0
  177. package/src/resources/customer-flow-edge-case.ts +709 -40
  178. package/src/resources/customer-flow.ts +3141 -156
  179. package/src/resources/{customer-profile.ts → customer.ts} +406 -294
  180. package/src/resources/index.ts +91 -17
  181. package/src/resources/mcp-server.ts +786 -0
  182. package/src/resources/metric-policy.ts +5 -4
  183. package/src/resources/metric-variant.ts +4 -1
  184. package/src/resources/metric.ts +7 -2
  185. package/src/resources/simulation-environment.ts +414 -0
  186. package/src/resources/simulation-job.ts +14 -8
  187. package/src/resources/simulation-persona.ts +25 -15
  188. package/src/resources/simulation-run-plan-job.ts +47 -6
  189. package/src/resources/simulation-run-plan.ts +140 -0
  190. package/src/resources/simulation-template.ts +1 -0
  191. package/src/resources/simulation.ts +39 -0
  192. package/src/resources/tool.ts +697 -6
  193. package/src/resources/usage.ts +6 -1
  194. package/src/resources/webhook.ts +8 -0
  195. package/src/version.ts +1 -1
  196. package/version.d.mts +1 -1
  197. package/version.d.ts +1 -1
  198. package/version.js +1 -1
  199. package/version.mjs +1 -1
  200. package/resources/customer-profile.d.mts.map +0 -1
  201. package/resources/customer-profile.d.ts.map +0 -1
  202. package/resources/customer-profile.js +0 -141
  203. package/resources/customer-profile.js.map +0 -1
  204. package/resources/customer-profile.mjs +0 -137
  205. package/resources/customer-profile.mjs.map +0 -1
@@ -0,0 +1,786 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+ import { path } from '../internal/utils/path';
7
+
8
+ export class McpServer extends APIResource {
9
+ /**
10
+ * Connects to the server, reads its tools, then stores it for the project. A
11
+ * server that does not answer, or refuses the credential, returns 400 and nothing
12
+ * is stored. The credential is encrypted and never returned.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const mcpServer = await client.mcpServer.create({
17
+ * label: 'CRM',
18
+ * url: 'https://mcp.example.com/mcp',
19
+ * });
20
+ * ```
21
+ */
22
+ create(body: McpServerCreateParams, options?: RequestOptions): APIPromise<McpServerCreateResponse> {
23
+ return this._client.post('/v1/connections/mcp-server', { body, ...options });
24
+ }
25
+
26
+ /**
27
+ * Renames the server or replaces its credential. A new credential is checked by
28
+ * connecting with it first; one the server refuses returns 400 and changes
29
+ * nothing.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const mcpServer = await client.mcpServer.update(
34
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
35
+ * );
36
+ * ```
37
+ */
38
+ update(
39
+ serverID: string,
40
+ body: McpServerUpdateParams | null | undefined = {},
41
+ options?: RequestOptions,
42
+ ): APIPromise<McpServerUpdateResponse> {
43
+ return this._client.patch(path`/v1/connections/mcp-server/${serverID}`, { body, ...options });
44
+ }
45
+
46
+ /**
47
+ * The project's MCP servers, by label, each with the tools it offered when last
48
+ * checked. Credentials are never returned.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * const mcpServers = await client.mcpServer.list();
53
+ * ```
54
+ */
55
+ list(options?: RequestOptions): APIPromise<McpServerListResponse> {
56
+ return this._client.get('/v1/connections/mcp-server', options);
57
+ }
58
+
59
+ /**
60
+ * Deletes the server and its stored credential. A server a tool still uses returns
61
+ * 409, naming the tools.
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * const mcpServer = await client.mcpServer.delete(
66
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
67
+ * );
68
+ * ```
69
+ */
70
+ delete(serverID: string, options?: RequestOptions): APIPromise<McpServerDeleteResponse> {
71
+ return this._client.delete(path`/v1/connections/mcp-server/${serverID}`, options);
72
+ }
73
+
74
+ /**
75
+ * Connects to a server and returns the tools it offers, without storing anything.
76
+ * Use it to check a url and credential before connecting.
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * const response = await client.mcpServer.discover({
81
+ * url: 'https://mcp.example.com/mcp',
82
+ * });
83
+ * ```
84
+ */
85
+ discover(body: McpServerDiscoverParams, options?: RequestOptions): APIPromise<McpServerDiscoverResponse> {
86
+ return this._client.post('/v1/connections/mcp-server/discover', { body, ...options });
87
+ }
88
+
89
+ /**
90
+ * One MCP server. The credential is never returned.
91
+ *
92
+ * @example
93
+ * ```ts
94
+ * const response = await client.mcpServer.getByID(
95
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
96
+ * );
97
+ * ```
98
+ */
99
+ getByID(serverID: string, options?: RequestOptions): APIPromise<McpServerGetByIDResponse> {
100
+ return this._client.get(path`/v1/connections/mcp-server/${serverID}`, options);
101
+ }
102
+
103
+ /**
104
+ * Connects to the server again and records the tools it offers now. Agents keep
105
+ * calling the tools they were given; a new tool reaches an agent only once you add
106
+ * it.
107
+ *
108
+ * @example
109
+ * ```ts
110
+ * const response = await client.mcpServer.refresh(
111
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
112
+ * );
113
+ * ```
114
+ */
115
+ refresh(serverID: string, options?: RequestOptions): APIPromise<McpServerRefreshResponse> {
116
+ return this._client.post(path`/v1/connections/mcp-server/${serverID}/refresh`, options);
117
+ }
118
+ }
119
+
120
+ export interface McpServerCreateResponse {
121
+ data: McpServerCreateResponse.Data;
122
+ }
123
+
124
+ export namespace McpServerCreateResponse {
125
+ export interface Data {
126
+ /**
127
+ * The id a tool names the server by
128
+ */
129
+ id: string;
130
+
131
+ /**
132
+ * The header a HEADER credential is sent in
133
+ */
134
+ authHeaderName: string | null;
135
+
136
+ /**
137
+ * How the server authenticates. The credential is never returned.
138
+ */
139
+ authType: 'NONE' | 'BEARER' | 'HEADER';
140
+
141
+ /**
142
+ * The tools calling on this server, and whether it still offers each
143
+ */
144
+ boundTools: Array<Data.BoundTool>;
145
+
146
+ /**
147
+ * Changes when the server changes the tools it offers
148
+ */
149
+ catalogHash: string;
150
+
151
+ createdAt: string;
152
+
153
+ /**
154
+ * The MCP registry entry it was connected from
155
+ */
156
+ directoryKey: string | null;
157
+
158
+ /**
159
+ * The server's own advice on using it, for you to read. Never shown to the agent.
160
+ */
161
+ instructions: string | null;
162
+
163
+ label: string;
164
+
165
+ lastDiscoveredAt: string;
166
+
167
+ /**
168
+ * The name the server gives itself
169
+ */
170
+ serverName: string | null;
171
+
172
+ serverVersion: string | null;
173
+
174
+ tools: Array<Data.Tool>;
175
+
176
+ transport: 'STREAMABLE_HTTP' | 'SSE';
177
+
178
+ updatedAt: string;
179
+
180
+ url: string;
181
+ }
182
+
183
+ export namespace Data {
184
+ export interface BoundTool {
185
+ name: string;
186
+
187
+ /**
188
+ * False when the server stopped offering it: agents lose the tool
189
+ */
190
+ offered: boolean;
191
+
192
+ /**
193
+ * The tool it calls, as the server names it
194
+ */
195
+ remoteToolName: string;
196
+
197
+ toolDefinitionId: string;
198
+ }
199
+
200
+ export interface Tool {
201
+ description: string | null;
202
+
203
+ /**
204
+ * The tool as the server names it
205
+ */
206
+ name: string;
207
+
208
+ /**
209
+ * The server's hint that the tool only reads
210
+ */
211
+ readOnly: boolean | null;
212
+
213
+ /**
214
+ * What a tool for it is called by default: the name with unusable characters
215
+ * replaced
216
+ */
217
+ suggestedName: string | null;
218
+
219
+ /**
220
+ * Why an agent could not use this tool, such as a name a built-in tool already has
221
+ */
222
+ unavailableReason: string | null;
223
+ }
224
+ }
225
+ }
226
+
227
+ export interface McpServerUpdateResponse {
228
+ data: McpServerUpdateResponse.Data;
229
+ }
230
+
231
+ export namespace McpServerUpdateResponse {
232
+ export interface Data {
233
+ /**
234
+ * The id a tool names the server by
235
+ */
236
+ id: string;
237
+
238
+ /**
239
+ * The header a HEADER credential is sent in
240
+ */
241
+ authHeaderName: string | null;
242
+
243
+ /**
244
+ * How the server authenticates. The credential is never returned.
245
+ */
246
+ authType: 'NONE' | 'BEARER' | 'HEADER';
247
+
248
+ /**
249
+ * The tools calling on this server, and whether it still offers each
250
+ */
251
+ boundTools: Array<Data.BoundTool>;
252
+
253
+ /**
254
+ * Changes when the server changes the tools it offers
255
+ */
256
+ catalogHash: string;
257
+
258
+ createdAt: string;
259
+
260
+ /**
261
+ * The MCP registry entry it was connected from
262
+ */
263
+ directoryKey: string | null;
264
+
265
+ /**
266
+ * The server's own advice on using it, for you to read. Never shown to the agent.
267
+ */
268
+ instructions: string | null;
269
+
270
+ label: string;
271
+
272
+ lastDiscoveredAt: string;
273
+
274
+ /**
275
+ * The name the server gives itself
276
+ */
277
+ serverName: string | null;
278
+
279
+ serverVersion: string | null;
280
+
281
+ tools: Array<Data.Tool>;
282
+
283
+ transport: 'STREAMABLE_HTTP' | 'SSE';
284
+
285
+ updatedAt: string;
286
+
287
+ url: string;
288
+ }
289
+
290
+ export namespace Data {
291
+ export interface BoundTool {
292
+ name: string;
293
+
294
+ /**
295
+ * False when the server stopped offering it: agents lose the tool
296
+ */
297
+ offered: boolean;
298
+
299
+ /**
300
+ * The tool it calls, as the server names it
301
+ */
302
+ remoteToolName: string;
303
+
304
+ toolDefinitionId: string;
305
+ }
306
+
307
+ export interface Tool {
308
+ description: string | null;
309
+
310
+ /**
311
+ * The tool as the server names it
312
+ */
313
+ name: string;
314
+
315
+ /**
316
+ * The server's hint that the tool only reads
317
+ */
318
+ readOnly: boolean | null;
319
+
320
+ /**
321
+ * What a tool for it is called by default: the name with unusable characters
322
+ * replaced
323
+ */
324
+ suggestedName: string | null;
325
+
326
+ /**
327
+ * Why an agent could not use this tool, such as a name a built-in tool already has
328
+ */
329
+ unavailableReason: string | null;
330
+ }
331
+ }
332
+ }
333
+
334
+ export interface McpServerListResponse {
335
+ data: Array<McpServerListResponse.Data>;
336
+ }
337
+
338
+ export namespace McpServerListResponse {
339
+ export interface Data {
340
+ /**
341
+ * The id a tool names the server by
342
+ */
343
+ id: string;
344
+
345
+ /**
346
+ * The header a HEADER credential is sent in
347
+ */
348
+ authHeaderName: string | null;
349
+
350
+ /**
351
+ * How the server authenticates. The credential is never returned.
352
+ */
353
+ authType: 'NONE' | 'BEARER' | 'HEADER';
354
+
355
+ /**
356
+ * The tools calling on this server, and whether it still offers each
357
+ */
358
+ boundTools: Array<Data.BoundTool>;
359
+
360
+ /**
361
+ * Changes when the server changes the tools it offers
362
+ */
363
+ catalogHash: string;
364
+
365
+ createdAt: string;
366
+
367
+ /**
368
+ * The MCP registry entry it was connected from
369
+ */
370
+ directoryKey: string | null;
371
+
372
+ /**
373
+ * The server's own advice on using it, for you to read. Never shown to the agent.
374
+ */
375
+ instructions: string | null;
376
+
377
+ label: string;
378
+
379
+ lastDiscoveredAt: string;
380
+
381
+ /**
382
+ * The name the server gives itself
383
+ */
384
+ serverName: string | null;
385
+
386
+ serverVersion: string | null;
387
+
388
+ tools: Array<Data.Tool>;
389
+
390
+ transport: 'STREAMABLE_HTTP' | 'SSE';
391
+
392
+ updatedAt: string;
393
+
394
+ url: string;
395
+ }
396
+
397
+ export namespace Data {
398
+ export interface BoundTool {
399
+ name: string;
400
+
401
+ /**
402
+ * False when the server stopped offering it: agents lose the tool
403
+ */
404
+ offered: boolean;
405
+
406
+ /**
407
+ * The tool it calls, as the server names it
408
+ */
409
+ remoteToolName: string;
410
+
411
+ toolDefinitionId: string;
412
+ }
413
+
414
+ export interface Tool {
415
+ description: string | null;
416
+
417
+ /**
418
+ * The tool as the server names it
419
+ */
420
+ name: string;
421
+
422
+ /**
423
+ * The server's hint that the tool only reads
424
+ */
425
+ readOnly: boolean | null;
426
+
427
+ /**
428
+ * What a tool for it is called by default: the name with unusable characters
429
+ * replaced
430
+ */
431
+ suggestedName: string | null;
432
+
433
+ /**
434
+ * Why an agent could not use this tool, such as a name a built-in tool already has
435
+ */
436
+ unavailableReason: string | null;
437
+ }
438
+ }
439
+ }
440
+
441
+ export interface McpServerDeleteResponse {
442
+ data: McpServerDeleteResponse.Data;
443
+ }
444
+
445
+ export namespace McpServerDeleteResponse {
446
+ export interface Data {
447
+ id: string;
448
+
449
+ deleted: true;
450
+ }
451
+ }
452
+
453
+ export interface McpServerDiscoverResponse {
454
+ data: McpServerDiscoverResponse.Data;
455
+ }
456
+
457
+ export namespace McpServerDiscoverResponse {
458
+ export interface Data {
459
+ /**
460
+ * Changes when the server changes the tools it offers
461
+ */
462
+ catalogHash: string;
463
+
464
+ /**
465
+ * The server's own advice on using it, for you to read. Never shown to the agent.
466
+ */
467
+ instructions: string | null;
468
+
469
+ /**
470
+ * The name the server gives itself
471
+ */
472
+ serverName: string | null;
473
+
474
+ serverVersion: string | null;
475
+
476
+ tools: Array<Data.Tool>;
477
+ }
478
+
479
+ export namespace Data {
480
+ export interface Tool {
481
+ description: string | null;
482
+
483
+ /**
484
+ * The tool as the server names it
485
+ */
486
+ name: string;
487
+
488
+ /**
489
+ * The server's hint that the tool only reads
490
+ */
491
+ readOnly: boolean | null;
492
+
493
+ /**
494
+ * What a tool for it is called by default: the name with unusable characters
495
+ * replaced
496
+ */
497
+ suggestedName: string | null;
498
+
499
+ /**
500
+ * Why an agent could not use this tool, such as a name a built-in tool already has
501
+ */
502
+ unavailableReason: string | null;
503
+ }
504
+ }
505
+ }
506
+
507
+ export interface McpServerGetByIDResponse {
508
+ data: McpServerGetByIDResponse.Data;
509
+ }
510
+
511
+ export namespace McpServerGetByIDResponse {
512
+ export interface Data {
513
+ /**
514
+ * The id a tool names the server by
515
+ */
516
+ id: string;
517
+
518
+ /**
519
+ * The header a HEADER credential is sent in
520
+ */
521
+ authHeaderName: string | null;
522
+
523
+ /**
524
+ * How the server authenticates. The credential is never returned.
525
+ */
526
+ authType: 'NONE' | 'BEARER' | 'HEADER';
527
+
528
+ /**
529
+ * The tools calling on this server, and whether it still offers each
530
+ */
531
+ boundTools: Array<Data.BoundTool>;
532
+
533
+ /**
534
+ * Changes when the server changes the tools it offers
535
+ */
536
+ catalogHash: string;
537
+
538
+ createdAt: string;
539
+
540
+ /**
541
+ * The MCP registry entry it was connected from
542
+ */
543
+ directoryKey: string | null;
544
+
545
+ /**
546
+ * The server's own advice on using it, for you to read. Never shown to the agent.
547
+ */
548
+ instructions: string | null;
549
+
550
+ label: string;
551
+
552
+ lastDiscoveredAt: string;
553
+
554
+ /**
555
+ * The name the server gives itself
556
+ */
557
+ serverName: string | null;
558
+
559
+ serverVersion: string | null;
560
+
561
+ tools: Array<Data.Tool>;
562
+
563
+ transport: 'STREAMABLE_HTTP' | 'SSE';
564
+
565
+ updatedAt: string;
566
+
567
+ url: string;
568
+ }
569
+
570
+ export namespace Data {
571
+ export interface BoundTool {
572
+ name: string;
573
+
574
+ /**
575
+ * False when the server stopped offering it: agents lose the tool
576
+ */
577
+ offered: boolean;
578
+
579
+ /**
580
+ * The tool it calls, as the server names it
581
+ */
582
+ remoteToolName: string;
583
+
584
+ toolDefinitionId: string;
585
+ }
586
+
587
+ export interface Tool {
588
+ description: string | null;
589
+
590
+ /**
591
+ * The tool as the server names it
592
+ */
593
+ name: string;
594
+
595
+ /**
596
+ * The server's hint that the tool only reads
597
+ */
598
+ readOnly: boolean | null;
599
+
600
+ /**
601
+ * What a tool for it is called by default: the name with unusable characters
602
+ * replaced
603
+ */
604
+ suggestedName: string | null;
605
+
606
+ /**
607
+ * Why an agent could not use this tool, such as a name a built-in tool already has
608
+ */
609
+ unavailableReason: string | null;
610
+ }
611
+ }
612
+ }
613
+
614
+ export interface McpServerRefreshResponse {
615
+ data: McpServerRefreshResponse.Data;
616
+ }
617
+
618
+ export namespace McpServerRefreshResponse {
619
+ export interface Data {
620
+ /**
621
+ * The id a tool names the server by
622
+ */
623
+ id: string;
624
+
625
+ /**
626
+ * The header a HEADER credential is sent in
627
+ */
628
+ authHeaderName: string | null;
629
+
630
+ /**
631
+ * How the server authenticates. The credential is never returned.
632
+ */
633
+ authType: 'NONE' | 'BEARER' | 'HEADER';
634
+
635
+ /**
636
+ * The tools calling on this server, and whether it still offers each
637
+ */
638
+ boundTools: Array<Data.BoundTool>;
639
+
640
+ /**
641
+ * Changes when the server changes the tools it offers
642
+ */
643
+ catalogHash: string;
644
+
645
+ createdAt: string;
646
+
647
+ /**
648
+ * The MCP registry entry it was connected from
649
+ */
650
+ directoryKey: string | null;
651
+
652
+ /**
653
+ * The server's own advice on using it, for you to read. Never shown to the agent.
654
+ */
655
+ instructions: string | null;
656
+
657
+ label: string;
658
+
659
+ lastDiscoveredAt: string;
660
+
661
+ /**
662
+ * The name the server gives itself
663
+ */
664
+ serverName: string | null;
665
+
666
+ serverVersion: string | null;
667
+
668
+ tools: Array<Data.Tool>;
669
+
670
+ transport: 'STREAMABLE_HTTP' | 'SSE';
671
+
672
+ updatedAt: string;
673
+
674
+ url: string;
675
+ }
676
+
677
+ export namespace Data {
678
+ export interface BoundTool {
679
+ name: string;
680
+
681
+ /**
682
+ * False when the server stopped offering it: agents lose the tool
683
+ */
684
+ offered: boolean;
685
+
686
+ /**
687
+ * The tool it calls, as the server names it
688
+ */
689
+ remoteToolName: string;
690
+
691
+ toolDefinitionId: string;
692
+ }
693
+
694
+ export interface Tool {
695
+ description: string | null;
696
+
697
+ /**
698
+ * The tool as the server names it
699
+ */
700
+ name: string;
701
+
702
+ /**
703
+ * The server's hint that the tool only reads
704
+ */
705
+ readOnly: boolean | null;
706
+
707
+ /**
708
+ * What a tool for it is called by default: the name with unusable characters
709
+ * replaced
710
+ */
711
+ suggestedName: string | null;
712
+
713
+ /**
714
+ * Why an agent could not use this tool, such as a name a built-in tool already has
715
+ */
716
+ unavailableReason: string | null;
717
+ }
718
+ }
719
+ }
720
+
721
+ export interface McpServerCreateParams {
722
+ label: string;
723
+
724
+ url: string;
725
+
726
+ auth?: { [key: string]: unknown };
727
+
728
+ directoryKey?: string | null;
729
+
730
+ transport?: 'STREAMABLE_HTTP' | 'SSE';
731
+ }
732
+
733
+ export interface McpServerUpdateParams {
734
+ /**
735
+ * How the server authenticates. Stored encrypted; never returned.
736
+ */
737
+ auth?:
738
+ | McpServerUpdateParams.UnionMember0
739
+ | McpServerUpdateParams.UnionMember1
740
+ | McpServerUpdateParams.UnionMember2;
741
+
742
+ label?: string;
743
+ }
744
+
745
+ export namespace McpServerUpdateParams {
746
+ export interface UnionMember0 {
747
+ type: 'NONE';
748
+ }
749
+
750
+ export interface UnionMember1 {
751
+ token: string;
752
+
753
+ type: 'BEARER';
754
+ }
755
+
756
+ export interface UnionMember2 {
757
+ name: string;
758
+
759
+ type: 'HEADER';
760
+
761
+ value: string;
762
+ }
763
+ }
764
+
765
+ export interface McpServerDiscoverParams {
766
+ url: string;
767
+
768
+ auth?: { [key: string]: unknown };
769
+
770
+ transport?: 'STREAMABLE_HTTP' | 'SSE';
771
+ }
772
+
773
+ export declare namespace McpServer {
774
+ export {
775
+ type McpServerCreateResponse as McpServerCreateResponse,
776
+ type McpServerUpdateResponse as McpServerUpdateResponse,
777
+ type McpServerListResponse as McpServerListResponse,
778
+ type McpServerDeleteResponse as McpServerDeleteResponse,
779
+ type McpServerDiscoverResponse as McpServerDiscoverResponse,
780
+ type McpServerGetByIDResponse as McpServerGetByIDResponse,
781
+ type McpServerRefreshResponse as McpServerRefreshResponse,
782
+ type McpServerCreateParams as McpServerCreateParams,
783
+ type McpServerUpdateParams as McpServerUpdateParams,
784
+ type McpServerDiscoverParams as McpServerDiscoverParams,
785
+ };
786
+ }