tako-sdk 0.1.4 → 1.0.1

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.
package/dist/index.d.cts CHANGED
@@ -1,99 +1,3419 @@
1
1
  /**
2
- * Tako API Types
2
+ * Knowledge Search API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
3
11
  */
4
- declare enum SourceIndex {
5
- TAKO = "tako",
6
- WEB = "web"
12
+ declare const BASE_PATH: string;
13
+ interface ConfigurationParameters {
14
+ basePath?: string;
15
+ fetchApi?: FetchAPI;
16
+ middleware?: Middleware[];
17
+ queryParamsStringify?: (params: HTTPQuery) => string;
18
+ username?: string;
19
+ password?: string;
20
+ apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>);
21
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>);
22
+ headers?: HTTPHeaders;
23
+ credentials?: RequestCredentials;
7
24
  }
8
- interface TakoConfig {
9
- apiKey: string;
10
- baseUrl?: string;
11
- pathPrefix?: string;
25
+ declare class Configuration {
26
+ private configuration;
27
+ constructor(configuration?: ConfigurationParameters);
28
+ set config(configuration: Configuration);
29
+ get basePath(): string;
30
+ get fetchApi(): FetchAPI | undefined;
31
+ get middleware(): Middleware[];
32
+ get queryParamsStringify(): (params: HTTPQuery) => string;
33
+ get username(): string | undefined;
34
+ get password(): string | undefined;
35
+ get apiKey(): ((name: string) => string | Promise<string>) | undefined;
36
+ get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
37
+ get headers(): HTTPHeaders | undefined;
38
+ get credentials(): RequestCredentials | undefined;
39
+ }
40
+ declare const DefaultConfig: Configuration;
41
+ /**
42
+ * This is the base class for all generated API classes.
43
+ */
44
+ declare class BaseAPI {
45
+ protected configuration: Configuration;
46
+ private static readonly jsonRegex;
47
+ private middleware;
48
+ constructor(configuration?: Configuration);
49
+ withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
50
+ withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
51
+ withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
52
+ /**
53
+ * Check if the given MIME is a JSON MIME.
54
+ * JSON MIME examples:
55
+ * application/json
56
+ * application/json; charset=UTF8
57
+ * APPLICATION/JSON
58
+ * application/vnd.company+json
59
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
60
+ * @return True if the given MIME is JSON, false otherwise.
61
+ */
62
+ protected isJsonMime(mime: string | null | undefined): boolean;
63
+ protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
64
+ private createFetchParams;
65
+ private fetchApi;
66
+ /**
67
+ * Create a shallow clone of `this` by constructing a new instance
68
+ * and then shallow cloning data members.
69
+ */
70
+ private clone;
12
71
  }
13
- interface KnowledgeSearchInput {
14
- text: string;
72
+ declare class ResponseError extends Error {
73
+ response: Response;
74
+ name: "ResponseError";
75
+ constructor(response: Response, msg?: string);
15
76
  }
16
- interface KnowledgeSearchRequest {
17
- inputs: KnowledgeSearchInput;
18
- source_indexes?: SourceIndex[];
77
+ declare class FetchError extends Error {
78
+ cause: Error;
79
+ name: "FetchError";
80
+ constructor(cause: Error, msg?: string);
19
81
  }
20
- interface Source {
21
- source_name: string;
22
- source_description: string;
23
- source_index: string;
82
+ declare class RequiredError extends Error {
83
+ field: string;
84
+ name: "RequiredError";
85
+ constructor(field: string, msg?: string);
86
+ }
87
+ declare const COLLECTION_FORMATS: {
88
+ csv: string;
89
+ ssv: string;
90
+ tsv: string;
91
+ pipes: string;
92
+ };
93
+ type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
94
+ type Json = any;
95
+ type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
96
+ type HTTPHeaders = {
97
+ [key: string]: string;
98
+ };
99
+ type HTTPQuery = {
100
+ [key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
101
+ };
102
+ type HTTPBody = Json | FormData | URLSearchParams;
103
+ type HTTPRequestInit = {
104
+ headers?: HTTPHeaders;
105
+ method: HTTPMethod;
106
+ credentials?: RequestCredentials;
107
+ body?: HTTPBody;
108
+ };
109
+ type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
110
+ type InitOverrideFunction = (requestContext: {
111
+ init: HTTPRequestInit;
112
+ context: RequestOpts;
113
+ }) => Promise<RequestInit>;
114
+ interface FetchParams {
24
115
  url: string;
116
+ init: RequestInit;
25
117
  }
26
- interface Methodology {
27
- methodology_name: string;
28
- methodology_description?: string;
118
+ interface RequestOpts {
119
+ path: string;
120
+ method: HTTPMethod;
121
+ headers: HTTPHeaders;
122
+ query?: HTTPQuery;
123
+ body?: HTTPBody;
29
124
  }
30
- interface KnowledgeCard {
31
- card_id: string;
32
- title: string;
33
- description: string;
34
- webpage_url: string;
35
- image_url: string;
36
- embed_url: string;
37
- sources: Source[];
38
- methodologies?: Methodology[];
39
- }
40
- interface KnowledgeSearchResponse {
41
- outputs: {
42
- knowledge_cards: KnowledgeCard[];
43
- };
125
+ declare function querystring(params: HTTPQuery, prefix?: string): string;
126
+ declare function exists(json: any, key: string): boolean;
127
+ declare function mapValues(data: any, fn: (item: any) => any): {
128
+ [key: string]: any;
129
+ };
130
+ declare function canConsumeForm(consumes: Consume[]): boolean;
131
+ interface Consume {
132
+ contentType: string;
44
133
  }
45
- interface TakoError {
46
- status: number;
47
- message: string;
48
- details?: any;
134
+ interface RequestContext {
135
+ fetch: FetchAPI;
136
+ url: string;
137
+ init: RequestInit;
138
+ }
139
+ interface ResponseContext {
140
+ fetch: FetchAPI;
141
+ url: string;
142
+ init: RequestInit;
143
+ response: Response;
144
+ }
145
+ interface ErrorContext {
146
+ fetch: FetchAPI;
147
+ url: string;
148
+ init: RequestInit;
149
+ error: unknown;
150
+ response?: Response;
151
+ }
152
+ interface Middleware {
153
+ pre?(context: RequestContext): Promise<FetchParams | void>;
154
+ post?(context: ResponseContext): Promise<Response | void>;
155
+ onError?(context: ErrorContext): Promise<Response | void>;
156
+ }
157
+ interface ApiResponse<T> {
158
+ raw: Response;
159
+ value(): Promise<T>;
160
+ }
161
+ interface ResponseTransformer<T> {
162
+ (json: any): T;
163
+ }
164
+ declare class JSONApiResponse<T> {
165
+ raw: Response;
166
+ private transformer;
167
+ constructor(raw: Response, transformer?: ResponseTransformer<T>);
168
+ value(): Promise<T>;
169
+ }
170
+ declare class VoidApiResponse {
171
+ raw: Response;
172
+ constructor(raw: Response);
173
+ value(): Promise<void>;
174
+ }
175
+ declare class BlobApiResponse {
176
+ raw: Response;
177
+ constructor(raw: Response);
178
+ value(): Promise<Blob>;
179
+ }
180
+ declare class TextApiResponse {
181
+ raw: Response;
182
+ constructor(raw: Response);
183
+ value(): Promise<string>;
184
+ }
185
+
186
+ /**
187
+ * Knowledge Search API
188
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
189
+ *
190
+ * The version of the OpenAPI document: 1.0.0
191
+ *
192
+ *
193
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
194
+ * https://openapi-generator.tech
195
+ * Do not edit the class manually.
196
+ */
197
+ /**
198
+ *
199
+ * @export
200
+ * @interface KnowledgeCardMethodology
201
+ */
202
+ interface KnowledgeCardMethodology {
203
+ /**
204
+ * The name of the methodology
205
+ * @type {string}
206
+ * @memberof KnowledgeCardMethodology
207
+ */
208
+ methodology_name: string | null;
209
+ /**
210
+ * The description of the methodology
211
+ * @type {string}
212
+ * @memberof KnowledgeCardMethodology
213
+ */
214
+ methodology_description: string | null;
215
+ }
216
+ /**
217
+ * Check if a given object implements the KnowledgeCardMethodology interface.
218
+ */
219
+ declare function instanceOfKnowledgeCardMethodology(value: object): value is KnowledgeCardMethodology;
220
+ declare function KnowledgeCardMethodologyFromJSON(json: any): KnowledgeCardMethodology;
221
+ declare function KnowledgeCardMethodologyFromJSONTyped(json: any, ignoreDiscriminator: boolean): KnowledgeCardMethodology;
222
+ declare function KnowledgeCardMethodologyToJSON(json: any): KnowledgeCardMethodology;
223
+ declare function KnowledgeCardMethodologyToJSONTyped(value?: KnowledgeCardMethodology | null, ignoreDiscriminator?: boolean): any;
224
+
225
+ /**
226
+ * Knowledge Search API
227
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
228
+ *
229
+ * The version of the OpenAPI document: 1.0.0
230
+ *
231
+ *
232
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
233
+ * https://openapi-generator.tech
234
+ * Do not edit the class manually.
235
+ */
236
+ /**
237
+ *
238
+ * @export
239
+ */
240
+ declare const CardSourceIndex: {
241
+ readonly Tako: "tako";
242
+ readonly Web: "web";
243
+ readonly ConnectedData: "connected_data";
244
+ readonly TakoDeepV2: "tako_deep_v2";
245
+ };
246
+ type CardSourceIndex = typeof CardSourceIndex[keyof typeof CardSourceIndex];
247
+ declare function instanceOfCardSourceIndex(value: any): boolean;
248
+ declare function CardSourceIndexFromJSON(json: any): CardSourceIndex;
249
+ declare function CardSourceIndexFromJSONTyped(json: any, ignoreDiscriminator: boolean): CardSourceIndex;
250
+ declare function CardSourceIndexToJSON(value?: CardSourceIndex | null): any;
251
+ declare function CardSourceIndexToJSONTyped(value: any, ignoreDiscriminator: boolean): CardSourceIndex;
252
+
253
+ /**
254
+ * Knowledge Search API
255
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
256
+ *
257
+ * The version of the OpenAPI document: 1.0.0
258
+ *
259
+ *
260
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
261
+ * https://openapi-generator.tech
262
+ * Do not edit the class manually.
263
+ */
264
+
265
+ /**
266
+ *
267
+ * @export
268
+ * @interface KnowledgeCardSourceIndexesInner
269
+ */
270
+ interface KnowledgeCardSourceIndexesInner {
271
+ /**
272
+ *
273
+ * @type {CardSourceIndex}
274
+ * @memberof KnowledgeCardSourceIndexesInner
275
+ */
276
+ index_type: CardSourceIndex;
277
+ /**
278
+ * An ID for a segment of a source index
279
+ * @type {string}
280
+ * @memberof KnowledgeCardSourceIndexesInner
281
+ */
282
+ segment_id: string;
283
+ }
284
+ /**
285
+ * Check if a given object implements the KnowledgeCardSourceIndexesInner interface.
286
+ */
287
+ declare function instanceOfKnowledgeCardSourceIndexesInner(value: object): value is KnowledgeCardSourceIndexesInner;
288
+ declare function KnowledgeCardSourceIndexesInnerFromJSON(json: any): KnowledgeCardSourceIndexesInner;
289
+ declare function KnowledgeCardSourceIndexesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): KnowledgeCardSourceIndexesInner;
290
+ declare function KnowledgeCardSourceIndexesInnerToJSON(json: any): KnowledgeCardSourceIndexesInner;
291
+ declare function KnowledgeCardSourceIndexesInnerToJSONTyped(value?: KnowledgeCardSourceIndexesInner | null, ignoreDiscriminator?: boolean): any;
292
+
293
+ /**
294
+ * Knowledge Search API
295
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
296
+ *
297
+ * The version of the OpenAPI document: 1.0.0
298
+ *
299
+ *
300
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
301
+ * https://openapi-generator.tech
302
+ * Do not edit the class manually.
303
+ */
304
+
305
+ /**
306
+ * The index of the source
307
+ * @export
308
+ * @interface SourceIndex
309
+ */
310
+ interface SourceIndex {
311
+ /**
312
+ *
313
+ * @type {CardSourceIndex}
314
+ * @memberof SourceIndex
315
+ */
316
+ index_type: CardSourceIndex;
317
+ /**
318
+ * An ID for a segment of a source index (optional for private indexes)
319
+ * @type {string}
320
+ * @memberof SourceIndex
321
+ */
322
+ segment_id: string;
323
+ /**
324
+ * An ID for a private index
325
+ * @type {string}
326
+ * @memberof SourceIndex
327
+ */
328
+ private_index_id: string;
329
+ }
330
+ /**
331
+ * Check if a given object implements the SourceIndex interface.
332
+ */
333
+ declare function instanceOfSourceIndex(value: object): value is SourceIndex;
334
+ declare function SourceIndexFromJSON(json: any): SourceIndex;
335
+ declare function SourceIndexFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceIndex;
336
+ declare function SourceIndexToJSON(json: any): SourceIndex;
337
+ declare function SourceIndexToJSONTyped(value?: SourceIndex | null, ignoreDiscriminator?: boolean): any;
338
+
339
+ /**
340
+ * Knowledge Search API
341
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
342
+ *
343
+ * The version of the OpenAPI document: 1.0.0
344
+ *
345
+ *
346
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
347
+ * https://openapi-generator.tech
348
+ * Do not edit the class manually.
349
+ */
350
+
351
+ /**
352
+ *
353
+ * @export
354
+ * @interface KnowledgeCardSource
355
+ */
356
+ interface KnowledgeCardSource {
357
+ /**
358
+ * The name of the source
359
+ * @type {string}
360
+ * @memberof KnowledgeCardSource
361
+ */
362
+ source_name: string | null;
363
+ /**
364
+ * The description of the source
365
+ * @type {string}
366
+ * @memberof KnowledgeCardSource
367
+ */
368
+ source_description: string | null;
369
+ /**
370
+ *
371
+ * @type {SourceIndex}
372
+ * @memberof KnowledgeCardSource
373
+ */
374
+ source_index: SourceIndex;
375
+ /**
376
+ * The URL of the source
377
+ * @type {string}
378
+ * @memberof KnowledgeCardSource
379
+ */
380
+ url: string | null;
381
+ /**
382
+ * Raw excerpt(s) retrieved from the source page — the unmodified web content the answer was grounded in, NOT the synthesized answer. Populated for WEB sources; null for sources that don't carry an extracted excerpt (e.g. TAKO sources).
383
+ * @type {string}
384
+ * @memberof KnowledgeCardSource
385
+ */
386
+ source_text?: string | null;
387
+ }
388
+ /**
389
+ * Check if a given object implements the KnowledgeCardSource interface.
390
+ */
391
+ declare function instanceOfKnowledgeCardSource(value: object): value is KnowledgeCardSource;
392
+ declare function KnowledgeCardSourceFromJSON(json: any): KnowledgeCardSource;
393
+ declare function KnowledgeCardSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): KnowledgeCardSource;
394
+ declare function KnowledgeCardSourceToJSON(json: any): KnowledgeCardSource;
395
+ declare function KnowledgeCardSourceToJSONTyped(value?: KnowledgeCardSource | null, ignoreDiscriminator?: boolean): any;
396
+
397
+ /**
398
+ * Knowledge Search API
399
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
400
+ *
401
+ * The version of the OpenAPI document: 1.0.0
402
+ *
403
+ *
404
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
405
+ * https://openapi-generator.tech
406
+ * Do not edit the class manually.
407
+ */
408
+ /**
409
+ *
410
+ * @export
411
+ */
412
+ declare const ContentFormat: {
413
+ readonly Csv: "csv";
414
+ readonly Text: "text";
415
+ };
416
+ type ContentFormat = typeof ContentFormat[keyof typeof ContentFormat];
417
+ declare function instanceOfContentFormat(value: any): boolean;
418
+ declare function ContentFormatFromJSON(json: any): ContentFormat;
419
+ declare function ContentFormatFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentFormat;
420
+ declare function ContentFormatToJSON(value?: ContentFormat | null): any;
421
+ declare function ContentFormatToJSONTyped(value: any, ignoreDiscriminator: boolean): ContentFormat;
422
+
423
+ /**
424
+ * Knowledge Search API
425
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
426
+ *
427
+ * The version of the OpenAPI document: 1.0.0
428
+ *
429
+ *
430
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
431
+ * https://openapi-generator.tech
432
+ * Do not edit the class manually.
433
+ */
434
+
435
+ /**
436
+ * Describes the downloadable content behind a result. `cost` is the USD the
437
+ * /contents call will charge for this result (Tako card CSV is free; web text is
438
+ * the canonical Contents rate). The inline fields (`data`/`total_rows`/
439
+ * `truncated`) are populated only by auto-contents / `/contents` inline mode;
440
+ * when unset, this is just the quote (format + cost), fetched later via the
441
+ * Contents endpoint (a Tako card URL -> ChartConfig -> CSV; any other URL ->
442
+ * page text).
443
+ * @export
444
+ * @interface ResultContent
445
+ */
446
+ interface ResultContent {
447
+ /**
448
+ *
449
+ * @type {ContentFormat}
450
+ * @memberof ResultContent
451
+ */
452
+ format: ContentFormat;
453
+ /**
454
+ *
455
+ * @type {number}
456
+ * @memberof ResultContent
457
+ */
458
+ cost?: number;
459
+ /**
460
+ *
461
+ * @type {string}
462
+ * @memberof ResultContent
463
+ */
464
+ data?: string | null;
465
+ /**
466
+ *
467
+ * @type {number}
468
+ * @memberof ResultContent
469
+ */
470
+ total_rows?: number | null;
471
+ /**
472
+ *
473
+ * @type {boolean}
474
+ * @memberof ResultContent
475
+ */
476
+ truncated?: boolean;
477
+ }
478
+ /**
479
+ * Check if a given object implements the ResultContent interface.
480
+ */
481
+ declare function instanceOfResultContent(value: object): value is ResultContent;
482
+ declare function ResultContentFromJSON(json: any): ResultContent;
483
+ declare function ResultContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResultContent;
484
+ declare function ResultContentToJSON(json: any): ResultContent;
485
+ declare function ResultContentToJSONTyped(value?: ResultContent | null, ignoreDiscriminator?: boolean): any;
486
+
487
+ /**
488
+ * Knowledge Search API
489
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
490
+ *
491
+ * The version of the OpenAPI document: 1.0.0
492
+ *
493
+ *
494
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
495
+ * https://openapi-generator.tech
496
+ * Do not edit the class manually.
497
+ */
498
+ /**
499
+ *
500
+ * @export
501
+ */
502
+ declare const KnowledgeCardRelevance: {
503
+ readonly High: "High";
504
+ readonly Medium: "Medium";
505
+ readonly Low: "Low";
506
+ };
507
+ type KnowledgeCardRelevance = typeof KnowledgeCardRelevance[keyof typeof KnowledgeCardRelevance];
508
+ declare function instanceOfKnowledgeCardRelevance(value: any): boolean;
509
+ declare function KnowledgeCardRelevanceFromJSON(json: any): KnowledgeCardRelevance;
510
+ declare function KnowledgeCardRelevanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): KnowledgeCardRelevance;
511
+ declare function KnowledgeCardRelevanceToJSON(value?: KnowledgeCardRelevance | null): any;
512
+ declare function KnowledgeCardRelevanceToJSONTyped(value: any, ignoreDiscriminator: boolean): KnowledgeCardRelevance;
513
+
514
+ /**
515
+ * Knowledge Search API
516
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
517
+ *
518
+ * The version of the OpenAPI document: 1.0.0
519
+ *
520
+ *
521
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
522
+ * https://openapi-generator.tech
523
+ * Do not edit the class manually.
524
+ */
525
+
526
+ /**
527
+ * A Tako knowledge card on the new search/answer surface. Mirrors the
528
+ * legacy KnowledgeCard minus data_url / visualization_data / ideal_viz_decisions,
529
+ * plus a `content` download descriptor.
530
+ * @export
531
+ * @interface TakoCard
532
+ */
533
+ interface TakoCard {
534
+ /**
535
+ *
536
+ * @type {string}
537
+ * @memberof TakoCard
538
+ */
539
+ card_id?: string | null;
540
+ /**
541
+ *
542
+ * @type {string}
543
+ * @memberof TakoCard
544
+ */
545
+ title?: string | null;
546
+ /**
547
+ *
548
+ * @type {string}
549
+ * @memberof TakoCard
550
+ */
551
+ description?: string | null;
552
+ /**
553
+ *
554
+ * @type {string}
555
+ * @memberof TakoCard
556
+ */
557
+ semantic_description?: string | null;
558
+ /**
559
+ *
560
+ * @type {string}
561
+ * @memberof TakoCard
562
+ */
563
+ webpage_url?: string | null;
564
+ /**
565
+ *
566
+ * @type {string}
567
+ * @memberof TakoCard
568
+ */
569
+ image_url?: string | null;
570
+ /**
571
+ *
572
+ * @type {string}
573
+ * @memberof TakoCard
574
+ */
575
+ embed_url?: string | null;
576
+ /**
577
+ *
578
+ * @type {Array<KnowledgeCardSource>}
579
+ * @memberof TakoCard
580
+ */
581
+ sources?: Array<KnowledgeCardSource> | null;
582
+ /**
583
+ *
584
+ * @type {Array<KnowledgeCardMethodology>}
585
+ * @memberof TakoCard
586
+ */
587
+ methodologies?: Array<KnowledgeCardMethodology> | null;
588
+ /**
589
+ *
590
+ * @type {Array<KnowledgeCardSourceIndexesInner>}
591
+ * @memberof TakoCard
592
+ */
593
+ source_indexes?: Array<KnowledgeCardSourceIndexesInner> | null;
594
+ /**
595
+ *
596
+ * @type {string}
597
+ * @memberof TakoCard
598
+ */
599
+ card_type?: string | null;
600
+ /**
601
+ *
602
+ * @type {KnowledgeCardRelevance}
603
+ * @memberof TakoCard
604
+ */
605
+ relevance?: KnowledgeCardRelevance | null;
606
+ /**
607
+ *
608
+ * @type {ResultContent}
609
+ * @memberof TakoCard
610
+ */
611
+ content?: ResultContent | null;
49
612
  }
50
- declare class TakoException extends Error {
51
- status: number;
52
- details?: any | undefined;
53
- constructor(status: number, message: string, details?: any | undefined);
613
+ /**
614
+ * Check if a given object implements the TakoCard interface.
615
+ */
616
+ declare function instanceOfTakoCard(value: object): value is TakoCard;
617
+ declare function TakoCardFromJSON(json: any): TakoCard;
618
+ declare function TakoCardFromJSONTyped(json: any, ignoreDiscriminator: boolean): TakoCard;
619
+ declare function TakoCardToJSON(json: any): TakoCard;
620
+ declare function TakoCardToJSONTyped(value?: TakoCard | null, ignoreDiscriminator?: boolean): any;
621
+
622
+ /**
623
+ * Knowledge Search API
624
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
625
+ *
626
+ * The version of the OpenAPI document: 1.0.0
627
+ *
628
+ *
629
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
630
+ * https://openapi-generator.tech
631
+ * Do not edit the class manually.
632
+ */
633
+
634
+ /**
635
+ * A single raw web search result returned by the WEB source index.
636
+ *
637
+ * Distinct from `KnowledgeCardSource` (a citation inside a synthesized
638
+ * answer) and `KnowledgeCard` (a Tako visualization). Web results are
639
+ * raw retrieval output — title, URL, optional snippet — independent of
640
+ * any LLM synthesis that may also happen over them.
641
+ * @export
642
+ * @interface WebResult
643
+ */
644
+ interface WebResult {
645
+ /**
646
+ * Title of the web page.
647
+ * @type {string}
648
+ * @memberof WebResult
649
+ */
650
+ title: string;
651
+ /**
652
+ * URL of the web page.
653
+ * @type {string}
654
+ * @memberof WebResult
655
+ */
656
+ url: string;
657
+ /**
658
+ * Excerpt(s) from the page that matched the query.
659
+ * @type {string}
660
+ * @memberof WebResult
661
+ */
662
+ snippet?: string | null;
663
+ /**
664
+ * Publisher / domain name, when extractable from the URL.
665
+ * @type {string}
666
+ * @memberof WebResult
667
+ */
668
+ source_name?: string | null;
669
+ /**
670
+ * Publication date of the page, when available.
671
+ * @type {string}
672
+ * @memberof WebResult
673
+ */
674
+ publish_date?: string | null;
675
+ /**
676
+ * Downloadable content descriptor for this result, fetched via the Contents endpoint. Web results are always downloadable as text. None for callers that do not populate it.
677
+ * @type {ResultContent}
678
+ * @memberof WebResult
679
+ */
680
+ content?: ResultContent | null;
681
+ /**
682
+ * 1-based citation number that the answer's inline [N] markers reference. Set only when the answer inline-cites this result (the Agent API); None on raw-retrieval surfaces.
683
+ * @type {number}
684
+ * @memberof WebResult
685
+ */
686
+ citation_number?: number | null;
54
687
  }
55
- declare class TakoUnauthorizedException extends TakoException {
56
- constructor(message?: string, details?: any);
688
+ /**
689
+ * Check if a given object implements the WebResult interface.
690
+ */
691
+ declare function instanceOfWebResult(value: object): value is WebResult;
692
+ declare function WebResultFromJSON(json: any): WebResult;
693
+ declare function WebResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebResult;
694
+ declare function WebResultToJSON(json: any): WebResult;
695
+ declare function WebResultToJSONTyped(value?: WebResult | null, ignoreDiscriminator?: boolean): any;
696
+
697
+ /**
698
+ * Knowledge Search API
699
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
700
+ *
701
+ * The version of the OpenAPI document: 1.0.0
702
+ *
703
+ *
704
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
705
+ * https://openapi-generator.tech
706
+ * Do not edit the class manually.
707
+ */
708
+
709
+ /**
710
+ * Final agent output. answer is markdown; cards reuse the sibling TakoCard.
711
+ * @export
712
+ * @interface AgentResult
713
+ */
714
+ interface AgentResult {
715
+ /**
716
+ *
717
+ * @type {string}
718
+ * @memberof AgentResult
719
+ */
720
+ answer?: string | null;
721
+ /**
722
+ *
723
+ * @type {Array<TakoCard>}
724
+ * @memberof AgentResult
725
+ */
726
+ cards?: Array<TakoCard>;
727
+ /**
728
+ *
729
+ * @type {Array<WebResult>}
730
+ * @memberof AgentResult
731
+ */
732
+ web_results?: Array<WebResult>;
733
+ /**
734
+ *
735
+ * @type {string}
736
+ * @memberof AgentResult
737
+ */
738
+ request_id?: string | null;
57
739
  }
58
- declare class TakoRateLimitException extends TakoException {
59
- constructor(message?: string, details?: any);
740
+ /**
741
+ * Check if a given object implements the AgentResult interface.
742
+ */
743
+ declare function instanceOfAgentResult(value: object): value is AgentResult;
744
+ declare function AgentResultFromJSON(json: any): AgentResult;
745
+ declare function AgentResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentResult;
746
+ declare function AgentResultToJSON(json: any): AgentResult;
747
+ declare function AgentResultToJSONTyped(value?: AgentResult | null, ignoreDiscriminator?: boolean): any;
748
+
749
+ /**
750
+ * Knowledge Search API
751
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
752
+ *
753
+ * The version of the OpenAPI document: 1.0.0
754
+ *
755
+ *
756
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
757
+ * https://openapi-generator.tech
758
+ * Do not edit the class manually.
759
+ */
760
+ /**
761
+ *
762
+ * @export
763
+ */
764
+ declare const AgentRunStatus: {
765
+ readonly Queued: "queued";
766
+ readonly Running: "running";
767
+ readonly Completed: "completed";
768
+ readonly Failed: "failed";
769
+ };
770
+ type AgentRunStatus = typeof AgentRunStatus[keyof typeof AgentRunStatus];
771
+ declare function instanceOfAgentRunStatus(value: any): boolean;
772
+ declare function AgentRunStatusFromJSON(json: any): AgentRunStatus;
773
+ declare function AgentRunStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentRunStatus;
774
+ declare function AgentRunStatusToJSON(value?: AgentRunStatus | null): any;
775
+ declare function AgentRunStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): AgentRunStatus;
776
+
777
+ /**
778
+ * Knowledge Search API
779
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
780
+ *
781
+ * The version of the OpenAPI document: 1.0.0
782
+ *
783
+ *
784
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
785
+ * https://openapi-generator.tech
786
+ * Do not edit the class manually.
787
+ */
788
+ /**
789
+ *
790
+ * @export
791
+ * @interface ErrorObject
792
+ */
793
+ interface ErrorObject {
794
+ /**
795
+ *
796
+ * @type {string}
797
+ * @memberof ErrorObject
798
+ */
799
+ code: string;
800
+ /**
801
+ *
802
+ * @type {string}
803
+ * @memberof ErrorObject
804
+ */
805
+ message: string;
60
806
  }
807
+ /**
808
+ * Check if a given object implements the ErrorObject interface.
809
+ */
810
+ declare function instanceOfErrorObject(value: object): value is ErrorObject;
811
+ declare function ErrorObjectFromJSON(json: any): ErrorObject;
812
+ declare function ErrorObjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorObject;
813
+ declare function ErrorObjectToJSON(json: any): ErrorObject;
814
+ declare function ErrorObjectToJSONTyped(value?: ErrorObject | null, ignoreDiscriminator?: boolean): any;
815
+
816
+ /**
817
+ * Knowledge Search API
818
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
819
+ *
820
+ * The version of the OpenAPI document: 1.0.0
821
+ *
822
+ *
823
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
824
+ * https://openapi-generator.tech
825
+ * Do not edit the class manually.
826
+ */
61
827
 
62
828
  /**
63
- * Tako API Client
829
+ * The run resource returned by dispatch (202) and poll (GET).
830
+ * @export
831
+ * @interface AgentRun
64
832
  */
65
- declare class TakoClient {
66
- private apiKey;
67
- private baseUrl;
68
- private pathPrefix;
833
+ interface AgentRun {
834
+ /**
835
+ *
836
+ * @type {string}
837
+ * @memberof AgentRun
838
+ */
839
+ run_id: string;
840
+ /**
841
+ *
842
+ * @type {AgentRunObjectEnum}
843
+ * @memberof AgentRun
844
+ */
845
+ object?: AgentRunObjectEnum;
846
+ /**
847
+ *
848
+ * @type {string}
849
+ * @memberof AgentRun
850
+ */
851
+ thread_id?: string | null;
852
+ /**
853
+ *
854
+ * @type {AgentRunStatus}
855
+ * @memberof AgentRun
856
+ */
857
+ status: AgentRunStatus;
858
+ /**
859
+ *
860
+ * @type {string}
861
+ * @memberof AgentRun
862
+ */
863
+ created_at: string;
864
+ /**
865
+ *
866
+ * @type {string}
867
+ * @memberof AgentRun
868
+ */
869
+ completed_at?: string | null;
69
870
  /**
70
- * Create a new Tako API client
71
- * @param config Configuration for the Tako API client
871
+ *
872
+ * @type {AgentResult}
873
+ * @memberof AgentRun
72
874
  */
73
- constructor(config: TakoConfig);
875
+ result?: AgentResult | null;
74
876
  /**
75
- * Make a request to the Tako API
76
- * @param path API endpoint path
77
- * @param method HTTP method
78
- * @param body Request body
79
- * @returns Response data
877
+ *
878
+ * @type {ErrorObject}
879
+ * @memberof AgentRun
80
880
  */
81
- private request;
881
+ error?: ErrorObject | null;
882
+ }
883
+ /**
884
+ * @export
885
+ */
886
+ declare const AgentRunObjectEnum: {
887
+ readonly AgentRun: "agent.run";
888
+ };
889
+ type AgentRunObjectEnum = typeof AgentRunObjectEnum[keyof typeof AgentRunObjectEnum];
890
+ /**
891
+ * Check if a given object implements the AgentRun interface.
892
+ */
893
+ declare function instanceOfAgentRun(value: object): value is AgentRun;
894
+ declare function AgentRunFromJSON(json: any): AgentRun;
895
+ declare function AgentRunFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentRun;
896
+ declare function AgentRunToJSON(json: any): AgentRun;
897
+ declare function AgentRunToJSONTyped(value?: AgentRun | null, ignoreDiscriminator?: boolean): any;
898
+
899
+ /**
900
+ * Knowledge Search API
901
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
902
+ *
903
+ * The version of the OpenAPI document: 1.0.0
904
+ *
905
+ *
906
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
907
+ * https://openapi-generator.tech
908
+ * Do not edit the class manually.
909
+ */
910
+ /**
911
+ * Public effort taxonomy for the Agent API. Only MEDIUM is supported in v1;
912
+ * the generated OpenAPI/SDK advertises exactly these members, so we add values
913
+ * (low/high) only as the agent gains public support for them.
914
+ * @export
915
+ */
916
+ declare const AgentEffortLevel: {
917
+ readonly Medium: "medium";
918
+ };
919
+ type AgentEffortLevel = typeof AgentEffortLevel[keyof typeof AgentEffortLevel];
920
+ declare function instanceOfAgentEffortLevel(value: any): boolean;
921
+ declare function AgentEffortLevelFromJSON(json: any): AgentEffortLevel;
922
+ declare function AgentEffortLevelFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentEffortLevel;
923
+ declare function AgentEffortLevelToJSON(value?: AgentEffortLevel | null): any;
924
+ declare function AgentEffortLevelToJSONTyped(value: any, ignoreDiscriminator: boolean): AgentEffortLevel;
925
+
926
+ /**
927
+ * Knowledge Search API
928
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
929
+ *
930
+ * The version of the OpenAPI document: 1.0.0
931
+ *
932
+ *
933
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
934
+ * https://openapi-generator.tech
935
+ * Do not edit the class manually.
936
+ */
937
+ /**
938
+ *
939
+ * @export
940
+ * @interface AgentOutputSettings
941
+ */
942
+ interface AgentOutputSettings {
82
943
  /**
83
- * Search Tako Knowledge using natural language
84
- * @param text The natural language query text
85
- * @param sourceIndexes Optional array of source indexes to search within
86
- * @returns Knowledge search results
944
+ * Render card preview images in dark mode. Omit to use the default (dark).
945
+ * @type {boolean}
946
+ * @memberof AgentOutputSettings
87
947
  */
88
- knowledgeSearch(text: string, sourceIndexes?: SourceIndex[]): Promise<KnowledgeSearchResponse>;
948
+ image_dark_mode?: boolean | null;
89
949
  }
950
+ /**
951
+ * Check if a given object implements the AgentOutputSettings interface.
952
+ */
953
+ declare function instanceOfAgentOutputSettings(value: object): value is AgentOutputSettings;
954
+ declare function AgentOutputSettingsFromJSON(json: any): AgentOutputSettings;
955
+ declare function AgentOutputSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentOutputSettings;
956
+ declare function AgentOutputSettingsToJSON(json: any): AgentOutputSettings;
957
+ declare function AgentOutputSettingsToJSONTyped(value?: AgentOutputSettings | null, ignoreDiscriminator?: boolean): any;
958
+
959
+ /**
960
+ * Knowledge Search API
961
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
962
+ *
963
+ * The version of the OpenAPI document: 1.0.0
964
+ *
965
+ *
966
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
967
+ * https://openapi-generator.tech
968
+ * Do not edit the class manually.
969
+ */
90
970
 
91
971
  /**
92
- * Create a new Tako API client
93
- * @param apiKey Your Tako API key
94
- * @param baseUrl Optional base URL for the Tako API
95
- * @returns A configured Tako client
972
+ *
973
+ * @export
974
+ * @interface AgentRunRequest
96
975
  */
97
- declare function createTakoClient(apiKey: string, baseUrl?: string): TakoClient;
976
+ interface AgentRunRequest {
977
+ /**
978
+ * Natural-language request for the agent.
979
+ * @type {string}
980
+ * @memberof AgentRunRequest
981
+ */
982
+ query: string;
983
+ /**
984
+ * Existing thread to continue (follow-up). Omit to start a new thread.
985
+ * @type {string}
986
+ * @memberof AgentRunRequest
987
+ */
988
+ thread_id?: string | null;
989
+ /**
990
+ * Agent effort level. Only 'medium' is currently supported.
991
+ * @type {AgentEffortLevel}
992
+ * @memberof AgentRunRequest
993
+ */
994
+ effort?: AgentEffortLevel;
995
+ /**
996
+ * Which sources the agent may use: 'tako' (connected data) and/or 'web' (open-web search). Defaults to ['tako'].
997
+ * @type {Array<AgentRunRequestSourceIndexesEnum>}
998
+ * @memberof AgentRunRequest
999
+ */
1000
+ source_indexes?: Array<AgentRunRequestSourceIndexesEnum>;
1001
+ /**
1002
+ * BCP-47 locale. Drives the language of the agent's answer (a non-English locale makes the agent respond in that language) and the locale used when rendering card preview images. Defaults to en-US.
1003
+ * @type {string}
1004
+ * @memberof AgentRunRequest
1005
+ */
1006
+ locale?: string;
1007
+ /**
1008
+ * IANA timezone (e.g. 'America/New_York') used to render dates/times in card preview images. Does not affect the returned data.
1009
+ * @type {string}
1010
+ * @memberof AgentRunRequest
1011
+ */
1012
+ timezone?: string | null;
1013
+ /**
1014
+ * Settings controlling the response/rendering.
1015
+ * @type {AgentOutputSettings}
1016
+ * @memberof AgentRunRequest
1017
+ */
1018
+ output_settings?: AgentOutputSettings | null;
1019
+ }
1020
+ /**
1021
+ * @export
1022
+ */
1023
+ declare const AgentRunRequestSourceIndexesEnum: {
1024
+ readonly Tako: "tako";
1025
+ readonly Web: "web";
1026
+ };
1027
+ type AgentRunRequestSourceIndexesEnum = typeof AgentRunRequestSourceIndexesEnum[keyof typeof AgentRunRequestSourceIndexesEnum];
1028
+ /**
1029
+ * Check if a given object implements the AgentRunRequest interface.
1030
+ */
1031
+ declare function instanceOfAgentRunRequest(value: object): value is AgentRunRequest;
1032
+ declare function AgentRunRequestFromJSON(json: any): AgentRunRequest;
1033
+ declare function AgentRunRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentRunRequest;
1034
+ declare function AgentRunRequestToJSON(json: any): AgentRunRequest;
1035
+ declare function AgentRunRequestToJSONTyped(value?: AgentRunRequest | null, ignoreDiscriminator?: boolean): any;
1036
+
1037
+ /**
1038
+ * Knowledge Search API
1039
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1040
+ *
1041
+ * The version of the OpenAPI document: 1.0.0
1042
+ *
1043
+ *
1044
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1045
+ * https://openapi-generator.tech
1046
+ * Do not edit the class manually.
1047
+ */
1048
+
1049
+ interface CreateAgentRunRequest {
1050
+ agentRunRequest?: AgentRunRequest;
1051
+ }
1052
+ interface GetAgentRunRequest {
1053
+ runId: string | null;
1054
+ startingAfter?: number;
1055
+ }
1056
+ /**
1057
+ * AgentApi - interface
1058
+ *
1059
+ * @export
1060
+ * @interface AgentApiInterface
1061
+ */
1062
+ interface AgentApiInterface {
1063
+ /**
1064
+ * Creates request options for createAgentRun without sending the request
1065
+ * @param {AgentRunRequest} [agentRunRequest]
1066
+ * @throws {RequiredError}
1067
+ * @memberof AgentApiInterface
1068
+ */
1069
+ createAgentRunRequestOpts(requestParameters: CreateAgentRunRequest): Promise<RequestOpts>;
1070
+ /**
1071
+ * Dispatch a deep-research agent run. Returns 202 with an AgentRun object; poll GET /v1/agent/runs/{run_id} until status is \'completed\' or \'failed\'.
1072
+ * @summary Dispatch an agent run
1073
+ * @param {AgentRunRequest} [agentRunRequest]
1074
+ * @param {*} [options] Override http request option.
1075
+ * @throws {RequiredError}
1076
+ * @memberof AgentApiInterface
1077
+ */
1078
+ createAgentRunRaw(requestParameters: CreateAgentRunRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<AgentRun>>;
1079
+ /**
1080
+ * Dispatch a deep-research agent run. Returns 202 with an AgentRun object; poll GET /v1/agent/runs/{run_id} until status is \'completed\' or \'failed\'.
1081
+ * Dispatch an agent run
1082
+ */
1083
+ createAgentRun(requestParameters: CreateAgentRunRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<AgentRun>;
1084
+ /**
1085
+ * Creates request options for getAgentRun without sending the request
1086
+ * @param {string} runId Run ID returned by POST /v1/agent/runs
1087
+ * @param {number} [startingAfter] SSE resume cursor (Accept: text/event-stream only). Replay events with seq strictly greater than this value. Equivalent to the Last-Event-ID header.
1088
+ * @throws {RequiredError}
1089
+ * @memberof AgentApiInterface
1090
+ */
1091
+ getAgentRunRequestOpts(requestParameters: GetAgentRunRequest): Promise<RequestOpts>;
1092
+ /**
1093
+ * Retrieve the current state of an agent run. Poll until status is \'completed\' or \'failed\'. result is populated when status is \'completed\'.
1094
+ * @summary Poll an agent run
1095
+ * @param {string} runId Run ID returned by POST /v1/agent/runs
1096
+ * @param {number} [startingAfter] SSE resume cursor (Accept: text/event-stream only). Replay events with seq strictly greater than this value. Equivalent to the Last-Event-ID header.
1097
+ * @param {*} [options] Override http request option.
1098
+ * @throws {RequiredError}
1099
+ * @memberof AgentApiInterface
1100
+ */
1101
+ getAgentRunRaw(requestParameters: GetAgentRunRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<AgentRun>>;
1102
+ /**
1103
+ * Retrieve the current state of an agent run. Poll until status is \'completed\' or \'failed\'. result is populated when status is \'completed\'.
1104
+ * Poll an agent run
1105
+ */
1106
+ getAgentRun(requestParameters: GetAgentRunRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<AgentRun>;
1107
+ }
1108
+ /**
1109
+ *
1110
+ */
1111
+ declare class AgentApi extends BaseAPI implements AgentApiInterface {
1112
+ /**
1113
+ * Creates request options for createAgentRun without sending the request
1114
+ */
1115
+ createAgentRunRequestOpts(requestParameters: CreateAgentRunRequest): Promise<RequestOpts>;
1116
+ /**
1117
+ * Dispatch a deep-research agent run. Returns 202 with an AgentRun object; poll GET /v1/agent/runs/{run_id} until status is \'completed\' or \'failed\'.
1118
+ * Dispatch an agent run
1119
+ */
1120
+ createAgentRunRaw(requestParameters: CreateAgentRunRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<AgentRun>>;
1121
+ /**
1122
+ * Dispatch a deep-research agent run. Returns 202 with an AgentRun object; poll GET /v1/agent/runs/{run_id} until status is \'completed\' or \'failed\'.
1123
+ * Dispatch an agent run
1124
+ */
1125
+ createAgentRun(requestParameters?: CreateAgentRunRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<AgentRun>;
1126
+ /**
1127
+ * Creates request options for getAgentRun without sending the request
1128
+ */
1129
+ getAgentRunRequestOpts(requestParameters: GetAgentRunRequest): Promise<RequestOpts>;
1130
+ /**
1131
+ * Retrieve the current state of an agent run. Poll until status is \'completed\' or \'failed\'. result is populated when status is \'completed\'.
1132
+ * Poll an agent run
1133
+ */
1134
+ getAgentRunRaw(requestParameters: GetAgentRunRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<AgentRun>>;
1135
+ /**
1136
+ * Retrieve the current state of an agent run. Poll until status is \'completed\' or \'failed\'. result is populated when status is \'completed\'.
1137
+ * Poll an agent run
1138
+ */
1139
+ getAgentRun(requestParameters: GetAgentRunRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<AgentRun>;
1140
+ }
1141
+
1142
+ /**
1143
+ * Knowledge Search API
1144
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1145
+ *
1146
+ * The version of the OpenAPI document: 1.0.0
1147
+ *
1148
+ *
1149
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1150
+ * https://openapi-generator.tech
1151
+ * Do not edit the class manually.
1152
+ */
1153
+
1154
+ /**
1155
+ * Response for POST /api/v1/answer — synthesized answer + retrieval.
1156
+ * @export
1157
+ * @interface AnswerResponse
1158
+ */
1159
+ interface AnswerResponse {
1160
+ /**
1161
+ * Synthesized text answer.
1162
+ * @type {string}
1163
+ * @memberof AnswerResponse
1164
+ */
1165
+ answer: string;
1166
+ /**
1167
+ * Tako cards backing the answer; cards[0] is the lead card — the best one to show alongside the answer.
1168
+ * @type {Array<TakoCard>}
1169
+ * @memberof AnswerResponse
1170
+ */
1171
+ cards?: Array<TakoCard>;
1172
+ /**
1173
+ *
1174
+ * @type {Array<WebResult>}
1175
+ * @memberof AnswerResponse
1176
+ */
1177
+ web_results?: Array<WebResult>;
1178
+ /**
1179
+ * Total quoted USD cost of the data inlined on this response — the summed per-fetch price of the results whose payload was populated (one charge per distinct extracted web URL; Tako card CSV is free). This is the QUOTE, not necessarily the amount billed: on a depleted prepaid (PAYG) balance the charge is clamped to the remaining balance, so the amount actually drawn can be less. A result's own `cost` is a per-fetch quote present whenever it is downloadable, so a result that was requested but whose extraction was skipped or failed still carries its quote; that un-inlined quote is excluded here. 0 when no contents were inlined.
1180
+ * @type {number}
1181
+ * @memberof AnswerResponse
1182
+ */
1183
+ contents_total_cost?: number;
1184
+ /**
1185
+ *
1186
+ * @type {string}
1187
+ * @memberof AnswerResponse
1188
+ */
1189
+ request_id: string;
1190
+ }
1191
+ /**
1192
+ * Check if a given object implements the AnswerResponse interface.
1193
+ */
1194
+ declare function instanceOfAnswerResponse(value: object): value is AnswerResponse;
1195
+ declare function AnswerResponseFromJSON(json: any): AnswerResponse;
1196
+ declare function AnswerResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnswerResponse;
1197
+ declare function AnswerResponseToJSON(json: any): AnswerResponse;
1198
+ declare function AnswerResponseToJSONTyped(value?: AnswerResponse | null, ignoreDiscriminator?: boolean): any;
1199
+
1200
+ /**
1201
+ * Knowledge Search API
1202
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1203
+ *
1204
+ * The version of the OpenAPI document: 1.0.0
1205
+ *
1206
+ *
1207
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1208
+ * https://openapi-generator.tech
1209
+ * Do not edit the class manually.
1210
+ */
1211
+ /**
1212
+ * How /contents returns the content. URL (default) is the existing
1213
+ * presigned-download behavior; INLINE returns the content in the response body
1214
+ * (CSV text capped at 1000 rows, or web text) and skips the S3 upload.
1215
+ * @export
1216
+ */
1217
+ declare const ContentsDeliveryMode: {
1218
+ readonly Url: "url";
1219
+ readonly Inline: "inline";
1220
+ };
1221
+ type ContentsDeliveryMode = typeof ContentsDeliveryMode[keyof typeof ContentsDeliveryMode];
1222
+ declare function instanceOfContentsDeliveryMode(value: any): boolean;
1223
+ declare function ContentsDeliveryModeFromJSON(json: any): ContentsDeliveryMode;
1224
+ declare function ContentsDeliveryModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentsDeliveryMode;
1225
+ declare function ContentsDeliveryModeToJSON(value?: ContentsDeliveryMode | null): any;
1226
+ declare function ContentsDeliveryModeToJSONTyped(value: any, ignoreDiscriminator: boolean): ContentsDeliveryMode;
1227
+
1228
+ /**
1229
+ * Knowledge Search API
1230
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1231
+ *
1232
+ * The version of the OpenAPI document: 1.0.0
1233
+ *
1234
+ *
1235
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1236
+ * https://openapi-generator.tech
1237
+ * Do not edit the class manually.
1238
+ */
1239
+
1240
+ /**
1241
+ * Request body for POST /api/v1/contents.
1242
+ *
1243
+ * The caller passes the result URL it wants downloadable content for; the
1244
+ * endpoint detects the right content from the URL itself. A Tako card URL
1245
+ * resolves to a CSV of the card's underlying data; any other URL resolves to
1246
+ * the page's extracted full text. `mode` controls delivery: `url` (default)
1247
+ * returns a presigned download link; `inline` returns the content in the
1248
+ * response.
1249
+ * @export
1250
+ * @interface ContentsRequest
1251
+ */
1252
+ interface ContentsRequest {
1253
+ /**
1254
+ * The result URL to fetch downloadable content for (a TakoCard.webpage_url or a WebResult.url). A Tako card URL yields a CSV of the card's data; any other URL yields the page's extracted text.
1255
+ * @type {string}
1256
+ * @memberof ContentsRequest
1257
+ */
1258
+ url: string;
1259
+ /**
1260
+ * Delivery mode: 'url' (default) returns a presigned download link; 'inline' returns the content in the response body (CSV capped at 1000 rows, with total_rows; or web text).
1261
+ * @type {ContentsDeliveryMode}
1262
+ * @memberof ContentsRequest
1263
+ */
1264
+ mode?: ContentsDeliveryMode;
1265
+ }
1266
+ /**
1267
+ * Check if a given object implements the ContentsRequest interface.
1268
+ */
1269
+ declare function instanceOfContentsRequest(value: object): value is ContentsRequest;
1270
+ declare function ContentsRequestFromJSON(json: any): ContentsRequest;
1271
+ declare function ContentsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentsRequest;
1272
+ declare function ContentsRequestToJSON(json: any): ContentsRequest;
1273
+ declare function ContentsRequestToJSONTyped(value?: ContentsRequest | null, ignoreDiscriminator?: boolean): any;
1274
+
1275
+ /**
1276
+ * Knowledge Search API
1277
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1278
+ *
1279
+ * The version of the OpenAPI document: 1.0.0
1280
+ *
1281
+ *
1282
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1283
+ * https://openapi-generator.tech
1284
+ * Do not edit the class manually.
1285
+ */
1286
+
1287
+ /**
1288
+ * A single downloadable artifact.
1289
+ *
1290
+ * Inherits `format` + `cost` + the inline fields (`data`/`total_rows`/
1291
+ * `truncated`) from ResultContent. URL mode additionally populates
1292
+ * `url`/`expires_at` (a short-lived presigned download link); INLINE mode
1293
+ * populates the inherited inline fields and leaves `url`/`expires_at` null.
1294
+ * @export
1295
+ * @interface ContentItem
1296
+ */
1297
+ interface ContentItem {
1298
+ /**
1299
+ *
1300
+ * @type {ContentFormat}
1301
+ * @memberof ContentItem
1302
+ */
1303
+ format: ContentFormat;
1304
+ /**
1305
+ *
1306
+ * @type {number}
1307
+ * @memberof ContentItem
1308
+ */
1309
+ cost?: number;
1310
+ /**
1311
+ *
1312
+ * @type {string}
1313
+ * @memberof ContentItem
1314
+ */
1315
+ data?: string | null;
1316
+ /**
1317
+ *
1318
+ * @type {number}
1319
+ * @memberof ContentItem
1320
+ */
1321
+ total_rows?: number | null;
1322
+ /**
1323
+ *
1324
+ * @type {boolean}
1325
+ * @memberof ContentItem
1326
+ */
1327
+ truncated?: boolean;
1328
+ /**
1329
+ * The originating result URL that was resolved.
1330
+ * @type {string}
1331
+ * @memberof ContentItem
1332
+ */
1333
+ source_url: string;
1334
+ /**
1335
+ * Presigned, short-lived URL to download the content.
1336
+ * @type {string}
1337
+ * @memberof ContentItem
1338
+ */
1339
+ url?: string | null;
1340
+ /**
1341
+ * ISO-8601 UTC timestamp when `url` expires.
1342
+ * @type {string}
1343
+ * @memberof ContentItem
1344
+ */
1345
+ expires_at?: string | null;
1346
+ }
1347
+ /**
1348
+ * Check if a given object implements the ContentItem interface.
1349
+ */
1350
+ declare function instanceOfContentItem(value: object): value is ContentItem;
1351
+ declare function ContentItemFromJSON(json: any): ContentItem;
1352
+ declare function ContentItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentItem;
1353
+ declare function ContentItemToJSON(json: any): ContentItem;
1354
+ declare function ContentItemToJSONTyped(value?: ContentItem | null, ignoreDiscriminator?: boolean): any;
1355
+
1356
+ /**
1357
+ * Knowledge Search API
1358
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1359
+ *
1360
+ * The version of the OpenAPI document: 1.0.0
1361
+ *
1362
+ *
1363
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1364
+ * https://openapi-generator.tech
1365
+ * Do not edit the class manually.
1366
+ */
1367
+
1368
+ /**
1369
+ * Response for POST /api/v1/contents.
1370
+ *
1371
+ * `contents` is a list so the contract stays stable if a single result ever
1372
+ * yields multiple artifacts; today it always carries exactly one item.
1373
+ * @export
1374
+ * @interface ContentsResponse
1375
+ */
1376
+ interface ContentsResponse {
1377
+ /**
1378
+ *
1379
+ * @type {Array<ContentItem>}
1380
+ * @memberof ContentsResponse
1381
+ */
1382
+ contents?: Array<ContentItem>;
1383
+ /**
1384
+ *
1385
+ * @type {string}
1386
+ * @memberof ContentsResponse
1387
+ */
1388
+ request_id: string;
1389
+ }
1390
+ /**
1391
+ * Check if a given object implements the ContentsResponse interface.
1392
+ */
1393
+ declare function instanceOfContentsResponse(value: object): value is ContentsResponse;
1394
+ declare function ContentsResponseFromJSON(json: any): ContentsResponse;
1395
+ declare function ContentsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentsResponse;
1396
+ declare function ContentsResponseToJSON(json: any): ContentsResponse;
1397
+ declare function ContentsResponseToJSONTyped(value?: ContentsResponse | null, ignoreDiscriminator?: boolean): any;
1398
+
1399
+ /**
1400
+ * Knowledge Search API
1401
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1402
+ *
1403
+ * The version of the OpenAPI document: 1.0.0
1404
+ *
1405
+ *
1406
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1407
+ * https://openapi-generator.tech
1408
+ * Do not edit the class manually.
1409
+ */
1410
+ /**
1411
+ * Component types supported for thin viz schemas with builder support.
1412
+ *
1413
+ * These component types have dedicated builders that process configurations,
1414
+ * add defaults, and apply theme styling automatically.
1415
+ * @export
1416
+ */
1417
+ declare const ComponentTypeEnum: {
1418
+ readonly CategoricalBar: "categorical_bar";
1419
+ readonly Choropleth: "choropleth";
1420
+ readonly DataTableChart: "data_table_chart";
1421
+ readonly FinancialBoxes: "financial_boxes";
1422
+ readonly GenericTimeseries: "generic_timeseries";
1423
+ readonly Header: "header";
1424
+ readonly Heatmap: "heatmap";
1425
+ readonly Histogram: "histogram";
1426
+ readonly Marimekko: "marimekko";
1427
+ readonly Pie: "pie";
1428
+ readonly Scatter: "scatter";
1429
+ readonly Table: "table";
1430
+ readonly Boxplot: "boxplot";
1431
+ readonly Treemap: "treemap";
1432
+ readonly Waterfall: "waterfall";
1433
+ readonly Sankey: "sankey";
1434
+ readonly Bubble: "bubble";
1435
+ readonly PersonCard: "person_card";
1436
+ readonly Timeline: "timeline";
1437
+ readonly TopLevelMetric: "top_level_metric";
1438
+ };
1439
+ type ComponentTypeEnum = typeof ComponentTypeEnum[keyof typeof ComponentTypeEnum];
1440
+ declare function instanceOfComponentTypeEnum(value: any): boolean;
1441
+ declare function ComponentTypeEnumFromJSON(json: any): ComponentTypeEnum;
1442
+ declare function ComponentTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ComponentTypeEnum;
1443
+ declare function ComponentTypeEnumToJSON(value?: ComponentTypeEnum | null): any;
1444
+ declare function ComponentTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): ComponentTypeEnum;
1445
+
1446
+ /**
1447
+ * Knowledge Search API
1448
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1449
+ *
1450
+ * The version of the OpenAPI document: 1.0.0
1451
+ *
1452
+ *
1453
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1454
+ * https://openapi-generator.tech
1455
+ * Do not edit the class manually.
1456
+ */
1457
+
1458
+ /**
1459
+ * Configuration for a single component in a card.
1460
+ * @export
1461
+ * @interface ComponentConfig
1462
+ */
1463
+ interface ComponentConfig {
1464
+ /**
1465
+ * Component type:
1466
+ * - bubble: Bubble chart (scatter plot with size dimension for 3-variable data)
1467
+ * - categorical_bar: Bar chart with categorical x-axis (e.g., regions, products)
1468
+ * - choropleth: Choropleth map showing geographic data with color intensity by region (US states or world)
1469
+ * - data_table_chart: Bar chart with auto-generated data table below showing values
1470
+ * - financial_boxes: Financial metric boxes with values and growth indicators (e.g., Revenue, EPS)
1471
+ * - generic_timeseries: timeseries chart
1472
+ * - header: Card header with title and description, automatically styled with theme
1473
+ * - heatmap: 2D heatmap with color intensity representing values (e.g., correlation matrix)
1474
+ * - histogram: Histogram chart showing frequency distribution of values
1475
+ * - person_card: Person profile card from an Exa person search result (includes career, education, and about tabs)
1476
+ * - pie: Pie chart showing proportional data as slices of a circle
1477
+ * - scatter: Scatter plot showing relationships between two continuous variables
1478
+ * - table: Data table with configurable columns and rows
1479
+ * - boxplot: Box plot showing statistical distributions (min, Q1, median, Q3, max)
1480
+ * - treemap: Treemap chart showing hierarchical data as proportional rectangles
1481
+ * - waterfall: Waterfall chart showing incremental positive/negative changes (e.g., income statement breakdown)
1482
+ * @type {ComponentTypeEnum}
1483
+ * @memberof ComponentConfig
1484
+ */
1485
+ component_type: ComponentTypeEnum;
1486
+ /**
1487
+ * Component variant (e.g., 'simple', 'financial')
1488
+ * @type {string}
1489
+ * @memberof ComponentConfig
1490
+ */
1491
+ component_variant?: string | null;
1492
+ /**
1493
+ * Component configuration data
1494
+ * @type {{ [key: string]: any; }}
1495
+ * @memberof ComponentConfig
1496
+ */
1497
+ config: {
1498
+ [key: string]: any;
1499
+ };
1500
+ }
1501
+ /**
1502
+ * Check if a given object implements the ComponentConfig interface.
1503
+ */
1504
+ declare function instanceOfComponentConfig(value: object): value is ComponentConfig;
1505
+ declare function ComponentConfigFromJSON(json: any): ComponentConfig;
1506
+ declare function ComponentConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ComponentConfig;
1507
+ declare function ComponentConfigToJSON(json: any): ComponentConfig;
1508
+ declare function ComponentConfigToJSONTyped(value?: ComponentConfig | null, ignoreDiscriminator?: boolean): any;
1509
+
1510
+ /**
1511
+ * Knowledge Search API
1512
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1513
+ *
1514
+ * The version of the OpenAPI document: 1.0.0
1515
+ *
1516
+ *
1517
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1518
+ * https://openapi-generator.tech
1519
+ * Do not edit the class manually.
1520
+ */
1521
+
1522
+ /**
1523
+ * Request model for creating a card directly with components.
1524
+ * @export
1525
+ * @interface CreateCardRequest
1526
+ */
1527
+ interface CreateCardRequest {
1528
+ /**
1529
+ * Full component configurations
1530
+ * @type {Array<ComponentConfig>}
1531
+ * @memberof CreateCardRequest
1532
+ */
1533
+ components: Array<ComponentConfig>;
1534
+ /**
1535
+ * Card title (falls back to header component title)
1536
+ * @type {string}
1537
+ * @memberof CreateCardRequest
1538
+ */
1539
+ title?: string | null;
1540
+ /**
1541
+ * Card description
1542
+ * @type {string}
1543
+ * @memberof CreateCardRequest
1544
+ */
1545
+ description?: string | null;
1546
+ /**
1547
+ * Data source attribution (displayed in footer)
1548
+ * @type {string}
1549
+ * @memberof CreateCardRequest
1550
+ */
1551
+ source?: string | null;
1552
+ /**
1553
+ * Chart height in pixels. When set, overrides the default aspect-ratio-based height for all chart components in this card. Must be between 100 and 2000.
1554
+ * @type {number}
1555
+ * @memberof CreateCardRequest
1556
+ */
1557
+ height?: number | null;
1558
+ /**
1559
+ * When True, the embed iframe operates in postMessage mode: the parent page injects visualization_data via window.postMessage after the iframe loads, rather than having data inlined in the embed URL. The response will include embed_mode='postmessage' when this is True, or embed_mode='post' otherwise.
1560
+ * @type {boolean}
1561
+ * @memberof CreateCardRequest
1562
+ */
1563
+ postmessage_embed?: boolean;
1564
+ /**
1565
+ * Target ISO 4217 currency code (e.g., 'USD', 'EUR'). When set, datasets with recognized currency units are converted to this currency using historical exchange rates. A methodology section is added explaining the conversion.
1566
+ * @type {string}
1567
+ * @memberof CreateCardRequest
1568
+ */
1569
+ normalize_currencies?: string | null;
1570
+ /**
1571
+ * Minutes to keep preview image available for download (ZDR only). Min 1, max 1440 (24h). When set on a ZDR card, a temporary preview image is generated and available for download until the TTL expires. Ignored for non-ZDR cards.
1572
+ * @type {number}
1573
+ * @memberof CreateCardRequest
1574
+ */
1575
+ image_ttl_minutes?: number | null;
1576
+ }
1577
+ /**
1578
+ * Check if a given object implements the CreateCardRequest interface.
1579
+ */
1580
+ declare function instanceOfCreateCardRequest(value: object): value is CreateCardRequest;
1581
+ declare function CreateCardRequestFromJSON(json: any): CreateCardRequest;
1582
+ declare function CreateCardRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCardRequest;
1583
+ declare function CreateCardRequestToJSON(json: any): CreateCardRequest;
1584
+ declare function CreateCardRequestToJSONTyped(value?: CreateCardRequest | null, ignoreDiscriminator?: boolean): any;
1585
+
1586
+ /**
1587
+ * Knowledge Search API
1588
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1589
+ *
1590
+ * The version of the OpenAPI document: 1.0.0
1591
+ *
1592
+ *
1593
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1594
+ * https://openapi-generator.tech
1595
+ * Do not edit the class manually.
1596
+ */
1597
+ /**
1598
+ * Documents a decision made by Tako's ideal viz logic for a specific ChartJS property.
1599
+ *
1600
+ * .. deprecated::
1601
+ * This class is deprecated in favor of the structured VizDecisions system.
1602
+ * Use VizDecisions with specific decision types (AggregationDecision, VizTypeDecision, etc.)
1603
+ * instead. The new system provides:
1604
+ * - Structured decision tracking with typed fields
1605
+ * - Override support (apply_override, reset_to_default)
1606
+ * - Better LLM context generation (get_summary_for_llm)
1607
+ *
1608
+ * Example migration:
1609
+ * # Old way (deprecated):
1610
+ * decisions.append(IdealVizDecision(
1611
+ * property_path="y_aggregation",
1612
+ * reason="Applied PCSS due to different units"
1613
+ * ))
1614
+ *
1615
+ * # New way:
1616
+ * viz_decisions.set_decision(
1617
+ * DecisionType.LEFT_AXIS_AGGREGATION,
1618
+ * AggregationDecision(
1619
+ * value="pcss",
1620
+ * source=DecisionSource.DATA_DRIVEN,
1621
+ * reason_code="different_units",
1622
+ * reason_display="Applied PCSS due to different units",
1623
+ * )
1624
+ * )
1625
+ *
1626
+ * This class will be removed in a future version.
1627
+ * @export
1628
+ * @interface IdealVizDecision
1629
+ */
1630
+ interface IdealVizDecision {
1631
+ /**
1632
+ * ChartJS property path
1633
+ * @type {string}
1634
+ * @memberof IdealVizDecision
1635
+ */
1636
+ property_path: string;
1637
+ /**
1638
+ * Human-friendly display name for the property path
1639
+ * @type {string}
1640
+ * @memberof IdealVizDecision
1641
+ */
1642
+ property_path_display_name?: string | null;
1643
+ /**
1644
+ * Why this decision was made
1645
+ * @type {string}
1646
+ * @memberof IdealVizDecision
1647
+ */
1648
+ reason: string;
1649
+ }
1650
+ /**
1651
+ * Check if a given object implements the IdealVizDecision interface.
1652
+ */
1653
+ declare function instanceOfIdealVizDecision(value: object): value is IdealVizDecision;
1654
+ declare function IdealVizDecisionFromJSON(json: any): IdealVizDecision;
1655
+ declare function IdealVizDecisionFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdealVizDecision;
1656
+ declare function IdealVizDecisionToJSON(json: any): IdealVizDecision;
1657
+ declare function IdealVizDecisionToJSONTyped(value?: IdealVizDecision | null, ignoreDiscriminator?: boolean): any;
1658
+
1659
+ /**
1660
+ * Knowledge Search API
1661
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1662
+ *
1663
+ * The version of the OpenAPI document: 1.0.0
1664
+ *
1665
+ *
1666
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1667
+ * https://openapi-generator.tech
1668
+ * Do not edit the class manually.
1669
+ */
1670
+
1671
+ /**
1672
+ *
1673
+ * @export
1674
+ * @interface KnowledgeCard
1675
+ */
1676
+ interface KnowledgeCard {
1677
+ /**
1678
+ * The unique ID of the knowledge card
1679
+ * @type {string}
1680
+ * @memberof KnowledgeCard
1681
+ */
1682
+ card_id: string | null;
1683
+ /**
1684
+ * The unique ID of the knowledge card
1685
+ * @type {string}
1686
+ * @memberof KnowledgeCard
1687
+ */
1688
+ title: string | null;
1689
+ /**
1690
+ * The unique ID of the knowledge card
1691
+ * @type {string}
1692
+ * @memberof KnowledgeCard
1693
+ */
1694
+ description: string | null;
1695
+ /**
1696
+ * The unique ID of the knowledge card
1697
+ * @type {string}
1698
+ * @memberof KnowledgeCard
1699
+ */
1700
+ semantic_description?: string | null;
1701
+ /**
1702
+ * The unique ID of the knowledge card
1703
+ * @type {string}
1704
+ * @memberof KnowledgeCard
1705
+ */
1706
+ webpage_url: string | null;
1707
+ /**
1708
+ * The unique ID of the knowledge card
1709
+ * @type {string}
1710
+ * @memberof KnowledgeCard
1711
+ */
1712
+ image_url: string | null;
1713
+ /**
1714
+ * The unique ID of the knowledge card
1715
+ * @type {string}
1716
+ * @memberof KnowledgeCard
1717
+ */
1718
+ embed_url: string | null;
1719
+ /**
1720
+ * The sources of the knowledge card
1721
+ * @type {Array<KnowledgeCardSource>}
1722
+ * @memberof KnowledgeCard
1723
+ */
1724
+ sources: Array<KnowledgeCardSource> | null;
1725
+ /**
1726
+ * The methodologies of the knowledge card
1727
+ * @type {Array<KnowledgeCardMethodology>}
1728
+ * @memberof KnowledgeCard
1729
+ */
1730
+ methodologies: Array<KnowledgeCardMethodology> | null;
1731
+ /**
1732
+ * The source indexes of the knowledge card
1733
+ * @type {Array<KnowledgeCardSourceIndexesInner>}
1734
+ * @memberof KnowledgeCard
1735
+ */
1736
+ source_indexes: Array<KnowledgeCardSourceIndexesInner> | null;
1737
+ /**
1738
+ * The unique ID of the knowledge card
1739
+ * @type {string}
1740
+ * @memberof KnowledgeCard
1741
+ */
1742
+ card_type: string | null;
1743
+ /**
1744
+ * URL of downloadable data of the knowledge card. This needs to be enabled on an account level. Contact support to enable this feature.
1745
+ * @type {string}
1746
+ * @memberof KnowledgeCard
1747
+ */
1748
+ data_url: string | null;
1749
+ /**
1750
+ * How relevant this knowledge card is to the search query
1751
+ * @type {KnowledgeCardRelevance}
1752
+ * @memberof KnowledgeCard
1753
+ */
1754
+ relevance: KnowledgeCardRelevance | null;
1755
+ /**
1756
+ * The visualization data of the knowledge card. Null when the card's sources do not permit raw data export (protected sources); the card remains renderable via embed_url.
1757
+ * @type {{ [key: string]: any; }}
1758
+ * @memberof KnowledgeCard
1759
+ */
1760
+ visualization_data: {
1761
+ [key: string]: any;
1762
+ } | null;
1763
+ /**
1764
+ * Decisions made by Tako's ideal viz logic when constructing this visualization. DEPRECATED: Use ChartConfig.viz_decisions for the new structured system with override support.
1765
+ * @type {Array<IdealVizDecision>}
1766
+ * @memberof KnowledgeCard
1767
+ */
1768
+ ideal_viz_decisions?: Array<IdealVizDecision> | null;
1769
+ }
1770
+ /**
1771
+ * Check if a given object implements the KnowledgeCard interface.
1772
+ */
1773
+ declare function instanceOfKnowledgeCard(value: object): value is KnowledgeCard;
1774
+ declare function KnowledgeCardFromJSON(json: any): KnowledgeCard;
1775
+ declare function KnowledgeCardFromJSONTyped(json: any, ignoreDiscriminator: boolean): KnowledgeCard;
1776
+ declare function KnowledgeCardToJSON(json: any): KnowledgeCard;
1777
+ declare function KnowledgeCardToJSONTyped(value?: KnowledgeCard | null, ignoreDiscriminator?: boolean): any;
1778
+
1779
+ /**
1780
+ * Knowledge Search API
1781
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1782
+ *
1783
+ * The version of the OpenAPI document: 1.0.0
1784
+ *
1785
+ *
1786
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1787
+ * https://openapi-generator.tech
1788
+ * Do not edit the class manually.
1789
+ */
1790
+ /**
1791
+ * Public effort taxonomy for the new endpoints. FAST is the default. INSTANT
1792
+ * serves cached embeds without re-running data retrieval and is available in all
1793
+ * environments. Cannot be combined with sources.tako.defer_data_retrieval.
1794
+ * The generated OpenAPI/SDK advertises exactly these members, so we add values
1795
+ * only as the pipeline gains support.
1796
+ * @export
1797
+ */
1798
+ declare const SearchEffortLevel: {
1799
+ readonly Fast: "fast";
1800
+ readonly Instant: "instant";
1801
+ };
1802
+ type SearchEffortLevel = typeof SearchEffortLevel[keyof typeof SearchEffortLevel];
1803
+ declare function instanceOfSearchEffortLevel(value: any): boolean;
1804
+ declare function SearchEffortLevelFromJSON(json: any): SearchEffortLevel;
1805
+ declare function SearchEffortLevelFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchEffortLevel;
1806
+ declare function SearchEffortLevelToJSON(value?: SearchEffortLevel | null): any;
1807
+ declare function SearchEffortLevelToJSONTyped(value: any, ignoreDiscriminator: boolean): SearchEffortLevel;
1808
+
1809
+ /**
1810
+ * Knowledge Search API
1811
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1812
+ *
1813
+ * The version of the OpenAPI document: 1.0.0
1814
+ *
1815
+ *
1816
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1817
+ * https://openapi-generator.tech
1818
+ * Do not edit the class manually.
1819
+ */
1820
+ /**
1821
+ *
1822
+ * @export
1823
+ * @interface OutputSettings
1824
+ */
1825
+ interface OutputSettings {
1826
+ /**
1827
+ * Whether to render card preview images in dark mode.
1828
+ * @type {boolean}
1829
+ * @memberof OutputSettings
1830
+ */
1831
+ image_dark_mode?: boolean | null;
1832
+ /**
1833
+ * Instant mode only. When false (default), instant returns existing cached embeds as-is (fastest) and never writes. When true, instant retrieves data for embeds that are missing or stale, then creates or refreshes their static embeds — slower for those, but it writes the result. Embeds already fresh (within the refresh cadence) are still served as-is, not re-retrieved or updated.
1834
+ * @type {boolean}
1835
+ * @memberof OutputSettings
1836
+ */
1837
+ force_refresh?: boolean;
1838
+ }
1839
+ /**
1840
+ * Check if a given object implements the OutputSettings interface.
1841
+ */
1842
+ declare function instanceOfOutputSettings(value: object): value is OutputSettings;
1843
+ declare function OutputSettingsFromJSON(json: any): OutputSettings;
1844
+ declare function OutputSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutputSettings;
1845
+ declare function OutputSettingsToJSON(json: any): OutputSettings;
1846
+ declare function OutputSettingsToJSONTyped(value?: OutputSettings | null, ignoreDiscriminator?: boolean): any;
1847
+
1848
+ /**
1849
+ * Knowledge Search API
1850
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1851
+ *
1852
+ * The version of the OpenAPI document: 1.0.0
1853
+ *
1854
+ *
1855
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1856
+ * https://openapi-generator.tech
1857
+ * Do not edit the class manually.
1858
+ */
1859
+ /**
1860
+ *
1861
+ * @export
1862
+ * @interface TakoSourceSettings
1863
+ */
1864
+ interface TakoSourceSettings {
1865
+ /**
1866
+ * Maximum number of results to return for this source. 1-20.
1867
+ * @type {number}
1868
+ * @memberof TakoSourceSettings
1869
+ */
1870
+ count?: number;
1871
+ /**
1872
+ * Inline this source's underlying data (CSV for Tako cards, extracted text for web results) directly in the response.
1873
+ * @type {boolean}
1874
+ * @memberof TakoSourceSettings
1875
+ */
1876
+ include_contents?: boolean;
1877
+ /**
1878
+ * Defer the expensive data-retrieval step: cards return faster with a semantic_description and a less detailed description. Mutually exclusive with include_contents (cannot inline data that was not fetched).
1879
+ * @type {boolean}
1880
+ * @memberof TakoSourceSettings
1881
+ */
1882
+ defer_data_retrieval?: boolean;
1883
+ }
1884
+ /**
1885
+ * Check if a given object implements the TakoSourceSettings interface.
1886
+ */
1887
+ declare function instanceOfTakoSourceSettings(value: object): value is TakoSourceSettings;
1888
+ declare function TakoSourceSettingsFromJSON(json: any): TakoSourceSettings;
1889
+ declare function TakoSourceSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): TakoSourceSettings;
1890
+ declare function TakoSourceSettingsToJSON(json: any): TakoSourceSettings;
1891
+ declare function TakoSourceSettingsToJSONTyped(value?: TakoSourceSettings | null, ignoreDiscriminator?: boolean): any;
1892
+
1893
+ /**
1894
+ * Knowledge Search API
1895
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1896
+ *
1897
+ * The version of the OpenAPI document: 1.0.0
1898
+ *
1899
+ *
1900
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1901
+ * https://openapi-generator.tech
1902
+ * Do not edit the class manually.
1903
+ */
1904
+ /**
1905
+ *
1906
+ * @export
1907
+ * @interface SourceSettings
1908
+ */
1909
+ interface SourceSettings {
1910
+ /**
1911
+ * Maximum number of results to return for this source. 1-20.
1912
+ * @type {number}
1913
+ * @memberof SourceSettings
1914
+ */
1915
+ count?: number;
1916
+ /**
1917
+ * Inline this source's underlying data (CSV for Tako cards, extracted text for web results) directly in the response.
1918
+ * @type {boolean}
1919
+ * @memberof SourceSettings
1920
+ */
1921
+ include_contents?: boolean;
1922
+ }
1923
+ /**
1924
+ * Check if a given object implements the SourceSettings interface.
1925
+ */
1926
+ declare function instanceOfSourceSettings(value: object): value is SourceSettings;
1927
+ declare function SourceSettingsFromJSON(json: any): SourceSettings;
1928
+ declare function SourceSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceSettings;
1929
+ declare function SourceSettingsToJSON(json: any): SourceSettings;
1930
+ declare function SourceSettingsToJSONTyped(value?: SourceSettings | null, ignoreDiscriminator?: boolean): any;
1931
+
1932
+ /**
1933
+ * Knowledge Search API
1934
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1935
+ *
1936
+ * The version of the OpenAPI document: 1.0.0
1937
+ *
1938
+ *
1939
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1940
+ * https://openapi-generator.tech
1941
+ * Do not edit the class manually.
1942
+ */
1943
+
1944
+ /**
1945
+ * Per-source settings. An index is searched iff its field is present.
1946
+ * @export
1947
+ * @interface Sources
1948
+ */
1949
+ interface Sources {
1950
+ /**
1951
+ * Tako card source. Searched iff present.
1952
+ * @type {TakoSourceSettings}
1953
+ * @memberof Sources
1954
+ */
1955
+ tako?: TakoSourceSettings | null;
1956
+ /**
1957
+ * Web source. Searched iff present.
1958
+ * @type {SourceSettings}
1959
+ * @memberof Sources
1960
+ */
1961
+ web?: SourceSettings | null;
1962
+ }
1963
+ /**
1964
+ * Check if a given object implements the Sources interface.
1965
+ */
1966
+ declare function instanceOfSources(value: object): value is Sources;
1967
+ declare function SourcesFromJSON(json: any): Sources;
1968
+ declare function SourcesFromJSONTyped(json: any, ignoreDiscriminator: boolean): Sources;
1969
+ declare function SourcesToJSON(json: any): Sources;
1970
+ declare function SourcesToJSONTyped(value?: Sources | null, ignoreDiscriminator?: boolean): any;
1971
+
1972
+ /**
1973
+ * Knowledge Search API
1974
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1975
+ *
1976
+ * The version of the OpenAPI document: 1.0.0
1977
+ *
1978
+ *
1979
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1980
+ * https://openapi-generator.tech
1981
+ * Do not edit the class manually.
1982
+ */
1983
+
1984
+ /**
1985
+ *
1986
+ * @export
1987
+ * @interface SearchRequest
1988
+ */
1989
+ interface SearchRequest {
1990
+ /**
1991
+ * Natural language search query.
1992
+ * @type {string}
1993
+ * @memberof SearchRequest
1994
+ */
1995
+ query: string;
1996
+ /**
1997
+ * Search effort level. Only 'fast' is currently supported.
1998
+ * @type {SearchEffortLevel}
1999
+ * @memberof SearchRequest
2000
+ */
2001
+ effort?: SearchEffortLevel;
2002
+ /**
2003
+ * Per-source settings. An index is searched iff its key is present; defaults to {tako:{}} (tako-only, count 5).
2004
+ * @type {Sources}
2005
+ * @memberof SearchRequest
2006
+ */
2007
+ sources?: Sources;
2008
+ /**
2009
+ * ISO 3166-1 alpha-2 country code for localization.
2010
+ * @type {string}
2011
+ * @memberof SearchRequest
2012
+ */
2013
+ country_code?: string;
2014
+ /**
2015
+ * BCP-47 locale tag for language/formatting.
2016
+ * @type {string}
2017
+ * @memberof SearchRequest
2018
+ */
2019
+ locale?: string;
2020
+ /**
2021
+ * IANA timezone (e.g. 'America/New_York').
2022
+ * @type {string}
2023
+ * @memberof SearchRequest
2024
+ */
2025
+ timezone?: string | null;
2026
+ /**
2027
+ * Settings controlling the response shape.
2028
+ * @type {OutputSettings}
2029
+ * @memberof SearchRequest
2030
+ */
2031
+ output_settings?: OutputSettings | null;
2032
+ }
2033
+ /**
2034
+ * Check if a given object implements the SearchRequest interface.
2035
+ */
2036
+ declare function instanceOfSearchRequest(value: object): value is SearchRequest;
2037
+ declare function SearchRequestFromJSON(json: any): SearchRequest;
2038
+ declare function SearchRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchRequest;
2039
+ declare function SearchRequestToJSON(json: any): SearchRequest;
2040
+ declare function SearchRequestToJSONTyped(value?: SearchRequest | null, ignoreDiscriminator?: boolean): any;
2041
+
2042
+ /**
2043
+ * Knowledge Search API
2044
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2045
+ *
2046
+ * The version of the OpenAPI document: 1.0.0
2047
+ *
2048
+ *
2049
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2050
+ * https://openapi-generator.tech
2051
+ * Do not edit the class manually.
2052
+ */
2053
+
2054
+ /**
2055
+ *
2056
+ * @export
2057
+ * @interface SearchResponse
2058
+ */
2059
+ interface SearchResponse {
2060
+ /**
2061
+ *
2062
+ * @type {Array<TakoCard>}
2063
+ * @memberof SearchResponse
2064
+ */
2065
+ cards?: Array<TakoCard>;
2066
+ /**
2067
+ *
2068
+ * @type {Array<WebResult>}
2069
+ * @memberof SearchResponse
2070
+ */
2071
+ web_results?: Array<WebResult>;
2072
+ /**
2073
+ * Total quoted USD cost of the data inlined on this response — the summed per-fetch price of the results whose payload was populated (one charge per distinct extracted web URL; Tako card CSV is free). This is the QUOTE, not necessarily the amount billed: on a depleted prepaid (PAYG) balance the charge is clamped to the remaining balance, so the amount actually drawn can be less. A result's own `cost` is a per-fetch quote present whenever it is downloadable, so a result that was requested but whose extraction was skipped or failed still carries its quote; that un-inlined quote is excluded here. 0 when no contents were inlined.
2074
+ * @type {number}
2075
+ * @memberof SearchResponse
2076
+ */
2077
+ contents_total_cost?: number;
2078
+ /**
2079
+ *
2080
+ * @type {string}
2081
+ * @memberof SearchResponse
2082
+ */
2083
+ request_id: string;
2084
+ }
2085
+ /**
2086
+ * Check if a given object implements the SearchResponse interface.
2087
+ */
2088
+ declare function instanceOfSearchResponse(value: object): value is SearchResponse;
2089
+ declare function SearchResponseFromJSON(json: any): SearchResponse;
2090
+ declare function SearchResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchResponse;
2091
+ declare function SearchResponseToJSON(json: any): SearchResponse;
2092
+ declare function SearchResponseToJSONTyped(value?: SearchResponse | null, ignoreDiscriminator?: boolean): any;
2093
+
2094
+ /**
2095
+ * Knowledge Search API
2096
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2097
+ *
2098
+ * The version of the OpenAPI document: 1.0.0
2099
+ *
2100
+ *
2101
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2102
+ * https://openapi-generator.tech
2103
+ * Do not edit the class manually.
2104
+ */
2105
+
2106
+ interface AnswerRequest {
2107
+ searchRequest?: SearchRequest;
2108
+ }
2109
+ interface ContentsOperationRequest {
2110
+ contentsRequest?: ContentsRequest;
2111
+ }
2112
+ interface CreateCardOperationRequest {
2113
+ createCardRequest?: CreateCardRequest;
2114
+ }
2115
+ interface SearchOperationRequest {
2116
+ searchRequest?: SearchRequest;
2117
+ }
2118
+ /**
2119
+ * TakoApi - interface
2120
+ *
2121
+ * @export
2122
+ * @interface TakoApiInterface
2123
+ */
2124
+ interface TakoApiInterface {
2125
+ /**
2126
+ * Creates request options for answer without sending the request
2127
+ * @param {SearchRequest} [searchRequest]
2128
+ * @throws {RequiredError}
2129
+ * @memberof TakoApiInterface
2130
+ */
2131
+ answerRequestOpts(requestParameters: AnswerRequest): Promise<RequestOpts>;
2132
+ /**
2133
+ * Fast-pipeline retrieval plus an LLM-synthesized answer with confidence. Replaces the grounding endpoint.
2134
+ * @summary Answer
2135
+ * @param {SearchRequest} [searchRequest]
2136
+ * @param {*} [options] Override http request option.
2137
+ * @throws {RequiredError}
2138
+ * @memberof TakoApiInterface
2139
+ */
2140
+ answerRaw(requestParameters: AnswerRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<AnswerResponse>>;
2141
+ /**
2142
+ * Fast-pipeline retrieval plus an LLM-synthesized answer with confidence. Replaces the grounding endpoint.
2143
+ * Answer
2144
+ */
2145
+ answer(requestParameters: AnswerRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<AnswerResponse>;
2146
+ /**
2147
+ * Creates request options for contents without sending the request
2148
+ * @param {ContentsRequest} [contentsRequest]
2149
+ * @throws {RequiredError}
2150
+ * @memberof TakoApiInterface
2151
+ */
2152
+ contentsRequestOpts(requestParameters: ContentsOperationRequest): Promise<RequestOpts>;
2153
+ /**
2154
+ * Download the content behind a search result: a CSV of a Tako card\'s underlying data, or the full text of a web page. Returns a short-lived presigned download URL. Protected-source cards (data export not available) return 403.
2155
+ * @summary Download content
2156
+ * @param {ContentsRequest} [contentsRequest]
2157
+ * @param {*} [options] Override http request option.
2158
+ * @throws {RequiredError}
2159
+ * @memberof TakoApiInterface
2160
+ */
2161
+ contentsRaw(requestParameters: ContentsOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<ContentsResponse>>;
2162
+ /**
2163
+ * Download the content behind a search result: a CSV of a Tako card\'s underlying data, or the full text of a web page. Returns a short-lived presigned download URL. Protected-source cards (data export not available) return 403.
2164
+ * Download content
2165
+ */
2166
+ contents(requestParameters: ContentsOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ContentsResponse>;
2167
+ /**
2168
+ * Creates request options for createCard without sending the request
2169
+ * @param {CreateCardRequest} [createCardRequest]
2170
+ * @throws {RequiredError}
2171
+ * @memberof TakoApiInterface
2172
+ */
2173
+ createCardRequestOpts(requestParameters: CreateCardOperationRequest): Promise<RequestOpts>;
2174
+ /**
2175
+ * Create a visualization card directly from component configurations. Supported component types: header, generic_timeseries, categorical_bar, stock_boxes, financial_boxes, table.
2176
+ * @param {CreateCardRequest} [createCardRequest]
2177
+ * @param {*} [options] Override http request option.
2178
+ * @throws {RequiredError}
2179
+ * @memberof TakoApiInterface
2180
+ */
2181
+ createCardRaw(requestParameters: CreateCardOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<KnowledgeCard>>;
2182
+ /**
2183
+ * Create a visualization card directly from component configurations. Supported component types: header, generic_timeseries, categorical_bar, stock_boxes, financial_boxes, table.
2184
+ */
2185
+ createCard(requestParameters: CreateCardOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<KnowledgeCard>;
2186
+ /**
2187
+ * Creates request options for search without sending the request
2188
+ * @param {SearchRequest} [searchRequest]
2189
+ * @throws {RequiredError}
2190
+ * @memberof TakoApiInterface
2191
+ */
2192
+ searchRequestOpts(requestParameters: SearchOperationRequest): Promise<RequestOpts>;
2193
+ /**
2194
+ * Fast-pipeline knowledge search. Returns Tako cards (and web results when requested) with no LLM synthesis.
2195
+ * @summary Search
2196
+ * @param {SearchRequest} [searchRequest]
2197
+ * @param {*} [options] Override http request option.
2198
+ * @throws {RequiredError}
2199
+ * @memberof TakoApiInterface
2200
+ */
2201
+ searchRaw(requestParameters: SearchOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<SearchResponse>>;
2202
+ /**
2203
+ * Fast-pipeline knowledge search. Returns Tako cards (and web results when requested) with no LLM synthesis.
2204
+ * Search
2205
+ */
2206
+ search(requestParameters: SearchOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<SearchResponse>;
2207
+ }
2208
+ /**
2209
+ *
2210
+ */
2211
+ declare class TakoApi extends BaseAPI implements TakoApiInterface {
2212
+ /**
2213
+ * Creates request options for answer without sending the request
2214
+ */
2215
+ answerRequestOpts(requestParameters: AnswerRequest): Promise<RequestOpts>;
2216
+ /**
2217
+ * Fast-pipeline retrieval plus an LLM-synthesized answer with confidence. Replaces the grounding endpoint.
2218
+ * Answer
2219
+ */
2220
+ answerRaw(requestParameters: AnswerRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<AnswerResponse>>;
2221
+ /**
2222
+ * Fast-pipeline retrieval plus an LLM-synthesized answer with confidence. Replaces the grounding endpoint.
2223
+ * Answer
2224
+ */
2225
+ answer(requestParameters?: AnswerRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<AnswerResponse>;
2226
+ /**
2227
+ * Creates request options for contents without sending the request
2228
+ */
2229
+ contentsRequestOpts(requestParameters: ContentsOperationRequest): Promise<RequestOpts>;
2230
+ /**
2231
+ * Download the content behind a search result: a CSV of a Tako card\'s underlying data, or the full text of a web page. Returns a short-lived presigned download URL. Protected-source cards (data export not available) return 403.
2232
+ * Download content
2233
+ */
2234
+ contentsRaw(requestParameters: ContentsOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<ContentsResponse>>;
2235
+ /**
2236
+ * Download the content behind a search result: a CSV of a Tako card\'s underlying data, or the full text of a web page. Returns a short-lived presigned download URL. Protected-source cards (data export not available) return 403.
2237
+ * Download content
2238
+ */
2239
+ contents(requestParameters?: ContentsOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ContentsResponse>;
2240
+ /**
2241
+ * Creates request options for createCard without sending the request
2242
+ */
2243
+ createCardRequestOpts(requestParameters: CreateCardOperationRequest): Promise<RequestOpts>;
2244
+ /**
2245
+ * Create a visualization card directly from component configurations. Supported component types: header, generic_timeseries, categorical_bar, stock_boxes, financial_boxes, table.
2246
+ */
2247
+ createCardRaw(requestParameters: CreateCardOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<KnowledgeCard>>;
2248
+ /**
2249
+ * Create a visualization card directly from component configurations. Supported component types: header, generic_timeseries, categorical_bar, stock_boxes, financial_boxes, table.
2250
+ */
2251
+ createCard(requestParameters?: CreateCardOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<KnowledgeCard>;
2252
+ /**
2253
+ * Creates request options for search without sending the request
2254
+ */
2255
+ searchRequestOpts(requestParameters: SearchOperationRequest): Promise<RequestOpts>;
2256
+ /**
2257
+ * Fast-pipeline knowledge search. Returns Tako cards (and web results when requested) with no LLM synthesis.
2258
+ * Search
2259
+ */
2260
+ searchRaw(requestParameters: SearchOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<SearchResponse>>;
2261
+ /**
2262
+ * Fast-pipeline knowledge search. Returns Tako cards (and web results when requested) with no LLM synthesis.
2263
+ * Search
2264
+ */
2265
+ search(requestParameters?: SearchOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<SearchResponse>;
2266
+ }
2267
+
2268
+ /**
2269
+ * Knowledge Search API
2270
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2271
+ *
2272
+ * The version of the OpenAPI document: 1.0.0
2273
+ *
2274
+ *
2275
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2276
+ * https://openapi-generator.tech
2277
+ * Do not edit the class manually.
2278
+ */
2279
+ /**
2280
+ *
2281
+ * @export
2282
+ */
2283
+ declare const APIErrorType: {
2284
+ readonly BadRequest: "BAD_REQUEST";
2285
+ readonly AuthenticationError: "AUTHENTICATION_ERROR";
2286
+ readonly InternalServerError: "INTERNAL_SERVER_ERROR";
2287
+ readonly RelevantResultsNotFound: "RELEVANT_RESULTS_NOT_FOUND";
2288
+ readonly RateLimitExceeded: "RATE_LIMIT_EXCEEDED";
2289
+ readonly PaymentRequired: "PAYMENT_REQUIRED";
2290
+ readonly RequestTimeout: "REQUEST_TIMEOUT";
2291
+ readonly Forbidden: "FORBIDDEN";
2292
+ readonly NotFound: "NOT_FOUND";
2293
+ };
2294
+ type APIErrorType = typeof APIErrorType[keyof typeof APIErrorType];
2295
+ declare function instanceOfAPIErrorType(value: any): boolean;
2296
+ declare function APIErrorTypeFromJSON(json: any): APIErrorType;
2297
+ declare function APIErrorTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): APIErrorType;
2298
+ declare function APIErrorTypeToJSON(value?: APIErrorType | null): any;
2299
+ declare function APIErrorTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): APIErrorType;
2300
+
2301
+ /**
2302
+ * Knowledge Search API
2303
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2304
+ *
2305
+ * The version of the OpenAPI document: 1.0.0
2306
+ *
2307
+ *
2308
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2309
+ * https://openapi-generator.tech
2310
+ * Do not edit the class manually.
2311
+ */
2312
+
2313
+ /**
2314
+ *
2315
+ * @export
2316
+ * @interface AgentResultEvent
2317
+ */
2318
+ interface AgentResultEvent {
2319
+ /**
2320
+ *
2321
+ * @type {AgentResultEventKindEnum}
2322
+ * @memberof AgentResultEvent
2323
+ */
2324
+ kind?: AgentResultEventKindEnum;
2325
+ /**
2326
+ *
2327
+ * @type {string}
2328
+ * @memberof AgentResultEvent
2329
+ */
2330
+ id: string;
2331
+ /**
2332
+ *
2333
+ * @type {AgentResult}
2334
+ * @memberof AgentResultEvent
2335
+ */
2336
+ data: AgentResult;
2337
+ }
2338
+ /**
2339
+ * @export
2340
+ */
2341
+ declare const AgentResultEventKindEnum: {
2342
+ readonly AgentResult: "agent_result";
2343
+ };
2344
+ type AgentResultEventKindEnum = typeof AgentResultEventKindEnum[keyof typeof AgentResultEventKindEnum];
2345
+ /**
2346
+ * Check if a given object implements the AgentResultEvent interface.
2347
+ */
2348
+ declare function instanceOfAgentResultEvent(value: object): value is AgentResultEvent;
2349
+ declare function AgentResultEventFromJSON(json: any): AgentResultEvent;
2350
+ declare function AgentResultEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentResultEvent;
2351
+ declare function AgentResultEventToJSON(json: any): AgentResultEvent;
2352
+ declare function AgentResultEventToJSONTyped(value?: AgentResultEvent | null, ignoreDiscriminator?: boolean): any;
2353
+
2354
+ /**
2355
+ * Knowledge Search API
2356
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2357
+ *
2358
+ * The version of the OpenAPI document: 1.0.0
2359
+ *
2360
+ *
2361
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2362
+ * https://openapi-generator.tech
2363
+ * Do not edit the class manually.
2364
+ */
2365
+ /**
2366
+ * Signals that the data pipeline produced chart(s) for the answer. Carries
2367
+ * only chart references; the answer text streams in `text` events and the
2368
+ * structured result arrives in the terminal `agent_result` event, not here.
2369
+ * @export
2370
+ * @interface DataPipelineAnswerEvent
2371
+ */
2372
+ interface DataPipelineAnswerEvent {
2373
+ /**
2374
+ *
2375
+ * @type {DataPipelineAnswerEventKindEnum}
2376
+ * @memberof DataPipelineAnswerEvent
2377
+ */
2378
+ kind?: DataPipelineAnswerEventKindEnum;
2379
+ /**
2380
+ *
2381
+ * @type {string}
2382
+ * @memberof DataPipelineAnswerEvent
2383
+ */
2384
+ id: string;
2385
+ /**
2386
+ *
2387
+ * @type {Array<string>}
2388
+ * @memberof DataPipelineAnswerEvent
2389
+ */
2390
+ chart_refs?: Array<string>;
2391
+ }
2392
+ /**
2393
+ * @export
2394
+ */
2395
+ declare const DataPipelineAnswerEventKindEnum: {
2396
+ readonly DataPipelineAnswer: "data_pipeline_answer";
2397
+ };
2398
+ type DataPipelineAnswerEventKindEnum = typeof DataPipelineAnswerEventKindEnum[keyof typeof DataPipelineAnswerEventKindEnum];
2399
+ /**
2400
+ * Check if a given object implements the DataPipelineAnswerEvent interface.
2401
+ */
2402
+ declare function instanceOfDataPipelineAnswerEvent(value: object): value is DataPipelineAnswerEvent;
2403
+ declare function DataPipelineAnswerEventFromJSON(json: any): DataPipelineAnswerEvent;
2404
+ declare function DataPipelineAnswerEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataPipelineAnswerEvent;
2405
+ declare function DataPipelineAnswerEventToJSON(json: any): DataPipelineAnswerEvent;
2406
+ declare function DataPipelineAnswerEventToJSONTyped(value?: DataPipelineAnswerEvent | null, ignoreDiscriminator?: boolean): any;
2407
+
2408
+ /**
2409
+ * Knowledge Search API
2410
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2411
+ *
2412
+ * The version of the OpenAPI document: 1.0.0
2413
+ *
2414
+ *
2415
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2416
+ * https://openapi-generator.tech
2417
+ * Do not edit the class manually.
2418
+ */
2419
+ /**
2420
+ *
2421
+ * @export
2422
+ * @interface HeartbeatEvent
2423
+ */
2424
+ interface HeartbeatEvent {
2425
+ /**
2426
+ *
2427
+ * @type {HeartbeatEventKindEnum}
2428
+ * @memberof HeartbeatEvent
2429
+ */
2430
+ kind?: HeartbeatEventKindEnum;
2431
+ }
2432
+ /**
2433
+ * @export
2434
+ */
2435
+ declare const HeartbeatEventKindEnum: {
2436
+ readonly Heartbeat: "heartbeat";
2437
+ };
2438
+ type HeartbeatEventKindEnum = typeof HeartbeatEventKindEnum[keyof typeof HeartbeatEventKindEnum];
2439
+ /**
2440
+ * Check if a given object implements the HeartbeatEvent interface.
2441
+ */
2442
+ declare function instanceOfHeartbeatEvent(value: object): value is HeartbeatEvent;
2443
+ declare function HeartbeatEventFromJSON(json: any): HeartbeatEvent;
2444
+ declare function HeartbeatEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): HeartbeatEvent;
2445
+ declare function HeartbeatEventToJSON(json: any): HeartbeatEvent;
2446
+ declare function HeartbeatEventToJSONTyped(value?: HeartbeatEvent | null, ignoreDiscriminator?: boolean): any;
2447
+
2448
+ /**
2449
+ * Knowledge Search API
2450
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2451
+ *
2452
+ * The version of the OpenAPI document: 1.0.0
2453
+ *
2454
+ *
2455
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2456
+ * https://openapi-generator.tech
2457
+ * Do not edit the class manually.
2458
+ */
2459
+ /**
2460
+ *
2461
+ * @export
2462
+ * @interface ReasoningEvent
2463
+ */
2464
+ interface ReasoningEvent {
2465
+ /**
2466
+ *
2467
+ * @type {ReasoningEventKindEnum}
2468
+ * @memberof ReasoningEvent
2469
+ */
2470
+ kind?: ReasoningEventKindEnum;
2471
+ /**
2472
+ *
2473
+ * @type {string}
2474
+ * @memberof ReasoningEvent
2475
+ */
2476
+ id: string;
2477
+ /**
2478
+ *
2479
+ * @type {string}
2480
+ * @memberof ReasoningEvent
2481
+ */
2482
+ delta: string;
2483
+ /**
2484
+ *
2485
+ * @type {boolean}
2486
+ * @memberof ReasoningEvent
2487
+ */
2488
+ done?: boolean;
2489
+ }
2490
+ /**
2491
+ * @export
2492
+ */
2493
+ declare const ReasoningEventKindEnum: {
2494
+ readonly Reasoning: "reasoning";
2495
+ };
2496
+ type ReasoningEventKindEnum = typeof ReasoningEventKindEnum[keyof typeof ReasoningEventKindEnum];
2497
+ /**
2498
+ * Check if a given object implements the ReasoningEvent interface.
2499
+ */
2500
+ declare function instanceOfReasoningEvent(value: object): value is ReasoningEvent;
2501
+ declare function ReasoningEventFromJSON(json: any): ReasoningEvent;
2502
+ declare function ReasoningEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReasoningEvent;
2503
+ declare function ReasoningEventToJSON(json: any): ReasoningEvent;
2504
+ declare function ReasoningEventToJSONTyped(value?: ReasoningEvent | null, ignoreDiscriminator?: boolean): any;
2505
+
2506
+ /**
2507
+ * Knowledge Search API
2508
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2509
+ *
2510
+ * The version of the OpenAPI document: 1.0.0
2511
+ *
2512
+ *
2513
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2514
+ * https://openapi-generator.tech
2515
+ * Do not edit the class manually.
2516
+ */
2517
+ /**
2518
+ *
2519
+ * @export
2520
+ * @interface StatusEvent
2521
+ */
2522
+ interface StatusEvent {
2523
+ /**
2524
+ *
2525
+ * @type {StatusEventKindEnum}
2526
+ * @memberof StatusEvent
2527
+ */
2528
+ kind?: StatusEventKindEnum;
2529
+ /**
2530
+ *
2531
+ * @type {string}
2532
+ * @memberof StatusEvent
2533
+ */
2534
+ message: string;
2535
+ /**
2536
+ *
2537
+ * @type {string}
2538
+ * @memberof StatusEvent
2539
+ */
2540
+ parent_id?: string | null;
2541
+ }
2542
+ /**
2543
+ * @export
2544
+ */
2545
+ declare const StatusEventKindEnum: {
2546
+ readonly Status: "status";
2547
+ };
2548
+ type StatusEventKindEnum = typeof StatusEventKindEnum[keyof typeof StatusEventKindEnum];
2549
+ /**
2550
+ * Check if a given object implements the StatusEvent interface.
2551
+ */
2552
+ declare function instanceOfStatusEvent(value: object): value is StatusEvent;
2553
+ declare function StatusEventFromJSON(json: any): StatusEvent;
2554
+ declare function StatusEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): StatusEvent;
2555
+ declare function StatusEventToJSON(json: any): StatusEvent;
2556
+ declare function StatusEventToJSONTyped(value?: StatusEvent | null, ignoreDiscriminator?: boolean): any;
2557
+
2558
+ /**
2559
+ * Knowledge Search API
2560
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2561
+ *
2562
+ * The version of the OpenAPI document: 1.0.0
2563
+ *
2564
+ *
2565
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2566
+ * https://openapi-generator.tech
2567
+ * Do not edit the class manually.
2568
+ */
2569
+ /**
2570
+ *
2571
+ * @export
2572
+ * @interface StreamDoneEvent
2573
+ */
2574
+ interface StreamDoneEvent {
2575
+ /**
2576
+ *
2577
+ * @type {StreamDoneEventKindEnum}
2578
+ * @memberof StreamDoneEvent
2579
+ */
2580
+ kind?: StreamDoneEventKindEnum;
2581
+ }
2582
+ /**
2583
+ * @export
2584
+ */
2585
+ declare const StreamDoneEventKindEnum: {
2586
+ readonly StreamDone: "stream_done";
2587
+ };
2588
+ type StreamDoneEventKindEnum = typeof StreamDoneEventKindEnum[keyof typeof StreamDoneEventKindEnum];
2589
+ /**
2590
+ * Check if a given object implements the StreamDoneEvent interface.
2591
+ */
2592
+ declare function instanceOfStreamDoneEvent(value: object): value is StreamDoneEvent;
2593
+ declare function StreamDoneEventFromJSON(json: any): StreamDoneEvent;
2594
+ declare function StreamDoneEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): StreamDoneEvent;
2595
+ declare function StreamDoneEventToJSON(json: any): StreamDoneEvent;
2596
+ declare function StreamDoneEventToJSONTyped(value?: StreamDoneEvent | null, ignoreDiscriminator?: boolean): any;
2597
+
2598
+ /**
2599
+ * Knowledge Search API
2600
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2601
+ *
2602
+ * The version of the OpenAPI document: 1.0.0
2603
+ *
2604
+ *
2605
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2606
+ * https://openapi-generator.tech
2607
+ * Do not edit the class manually.
2608
+ */
2609
+ /**
2610
+ *
2611
+ * @export
2612
+ * @interface StreamResetEvent
2613
+ */
2614
+ interface StreamResetEvent {
2615
+ /**
2616
+ *
2617
+ * @type {StreamResetEventKindEnum}
2618
+ * @memberof StreamResetEvent
2619
+ */
2620
+ kind?: StreamResetEventKindEnum;
2621
+ }
2622
+ /**
2623
+ * @export
2624
+ */
2625
+ declare const StreamResetEventKindEnum: {
2626
+ readonly StreamReset: "stream_reset";
2627
+ };
2628
+ type StreamResetEventKindEnum = typeof StreamResetEventKindEnum[keyof typeof StreamResetEventKindEnum];
2629
+ /**
2630
+ * Check if a given object implements the StreamResetEvent interface.
2631
+ */
2632
+ declare function instanceOfStreamResetEvent(value: object): value is StreamResetEvent;
2633
+ declare function StreamResetEventFromJSON(json: any): StreamResetEvent;
2634
+ declare function StreamResetEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): StreamResetEvent;
2635
+ declare function StreamResetEventToJSON(json: any): StreamResetEvent;
2636
+ declare function StreamResetEventToJSONTyped(value?: StreamResetEvent | null, ignoreDiscriminator?: boolean): any;
2637
+
2638
+ /**
2639
+ * Knowledge Search API
2640
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2641
+ *
2642
+ * The version of the OpenAPI document: 1.0.0
2643
+ *
2644
+ *
2645
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2646
+ * https://openapi-generator.tech
2647
+ * Do not edit the class manually.
2648
+ */
2649
+ /**
2650
+ *
2651
+ * @export
2652
+ * @interface SubagentEvent
2653
+ */
2654
+ interface SubagentEvent {
2655
+ /**
2656
+ *
2657
+ * @type {SubagentEventKindEnum}
2658
+ * @memberof SubagentEvent
2659
+ */
2660
+ kind?: SubagentEventKindEnum;
2661
+ /**
2662
+ *
2663
+ * @type {string}
2664
+ * @memberof SubagentEvent
2665
+ */
2666
+ agent_id: string;
2667
+ /**
2668
+ *
2669
+ * @type {string}
2670
+ * @memberof SubagentEvent
2671
+ */
2672
+ subagent_type: string;
2673
+ /**
2674
+ *
2675
+ * @type {string}
2676
+ * @memberof SubagentEvent
2677
+ */
2678
+ parent_id?: string | null;
2679
+ /**
2680
+ *
2681
+ * @type {SubagentEventEventEnum}
2682
+ * @memberof SubagentEvent
2683
+ */
2684
+ event: SubagentEventEventEnum;
2685
+ }
2686
+ /**
2687
+ * @export
2688
+ */
2689
+ declare const SubagentEventKindEnum: {
2690
+ readonly Subagent: "subagent";
2691
+ };
2692
+ type SubagentEventKindEnum = typeof SubagentEventKindEnum[keyof typeof SubagentEventKindEnum];
2693
+ /**
2694
+ * @export
2695
+ */
2696
+ declare const SubagentEventEventEnum: {
2697
+ readonly Dispatch: "dispatch";
2698
+ readonly Complete: "complete";
2699
+ };
2700
+ type SubagentEventEventEnum = typeof SubagentEventEventEnum[keyof typeof SubagentEventEventEnum];
2701
+ /**
2702
+ * Check if a given object implements the SubagentEvent interface.
2703
+ */
2704
+ declare function instanceOfSubagentEvent(value: object): value is SubagentEvent;
2705
+ declare function SubagentEventFromJSON(json: any): SubagentEvent;
2706
+ declare function SubagentEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubagentEvent;
2707
+ declare function SubagentEventToJSON(json: any): SubagentEvent;
2708
+ declare function SubagentEventToJSONTyped(value?: SubagentEvent | null, ignoreDiscriminator?: boolean): any;
2709
+
2710
+ /**
2711
+ * Knowledge Search API
2712
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2713
+ *
2714
+ * The version of the OpenAPI document: 1.0.0
2715
+ *
2716
+ *
2717
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2718
+ * https://openapi-generator.tech
2719
+ * Do not edit the class manually.
2720
+ */
2721
+ /**
2722
+ *
2723
+ * @export
2724
+ * @interface TextEvent
2725
+ */
2726
+ interface TextEvent {
2727
+ /**
2728
+ *
2729
+ * @type {TextEventKindEnum}
2730
+ * @memberof TextEvent
2731
+ */
2732
+ kind?: TextEventKindEnum;
2733
+ /**
2734
+ *
2735
+ * @type {string}
2736
+ * @memberof TextEvent
2737
+ */
2738
+ id: string;
2739
+ /**
2740
+ *
2741
+ * @type {string}
2742
+ * @memberof TextEvent
2743
+ */
2744
+ delta: string;
2745
+ /**
2746
+ *
2747
+ * @type {boolean}
2748
+ * @memberof TextEvent
2749
+ */
2750
+ done?: boolean;
2751
+ }
2752
+ /**
2753
+ * @export
2754
+ */
2755
+ declare const TextEventKindEnum: {
2756
+ readonly Text: "text";
2757
+ };
2758
+ type TextEventKindEnum = typeof TextEventKindEnum[keyof typeof TextEventKindEnum];
2759
+ /**
2760
+ * Check if a given object implements the TextEvent interface.
2761
+ */
2762
+ declare function instanceOfTextEvent(value: object): value is TextEvent;
2763
+ declare function TextEventFromJSON(json: any): TextEvent;
2764
+ declare function TextEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): TextEvent;
2765
+ declare function TextEventToJSON(json: any): TextEvent;
2766
+ declare function TextEventToJSONTyped(value?: TextEvent | null, ignoreDiscriminator?: boolean): any;
2767
+
2768
+ /**
2769
+ * Knowledge Search API
2770
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2771
+ *
2772
+ * The version of the OpenAPI document: 1.0.0
2773
+ *
2774
+ *
2775
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2776
+ * https://openapi-generator.tech
2777
+ * Do not edit the class manually.
2778
+ */
2779
+ /**
2780
+ *
2781
+ * @export
2782
+ * @interface ToolCallEvent
2783
+ */
2784
+ interface ToolCallEvent {
2785
+ /**
2786
+ *
2787
+ * @type {ToolCallEventKindEnum}
2788
+ * @memberof ToolCallEvent
2789
+ */
2790
+ kind?: ToolCallEventKindEnum;
2791
+ /**
2792
+ *
2793
+ * @type {string}
2794
+ * @memberof ToolCallEvent
2795
+ */
2796
+ id: string;
2797
+ /**
2798
+ *
2799
+ * @type {string}
2800
+ * @memberof ToolCallEvent
2801
+ */
2802
+ tool: string;
2803
+ /**
2804
+ *
2805
+ * @type {string}
2806
+ * @memberof ToolCallEvent
2807
+ */
2808
+ status_message?: string | null;
2809
+ /**
2810
+ *
2811
+ * @type {string}
2812
+ * @memberof ToolCallEvent
2813
+ */
2814
+ parent_id?: string | null;
2815
+ /**
2816
+ *
2817
+ * @type {boolean}
2818
+ * @memberof ToolCallEvent
2819
+ */
2820
+ done?: boolean;
2821
+ }
2822
+ /**
2823
+ * @export
2824
+ */
2825
+ declare const ToolCallEventKindEnum: {
2826
+ readonly ToolCall: "tool_call";
2827
+ };
2828
+ type ToolCallEventKindEnum = typeof ToolCallEventKindEnum[keyof typeof ToolCallEventKindEnum];
2829
+ /**
2830
+ * Check if a given object implements the ToolCallEvent interface.
2831
+ */
2832
+ declare function instanceOfToolCallEvent(value: object): value is ToolCallEvent;
2833
+ declare function ToolCallEventFromJSON(json: any): ToolCallEvent;
2834
+ declare function ToolCallEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolCallEvent;
2835
+ declare function ToolCallEventToJSON(json: any): ToolCallEvent;
2836
+ declare function ToolCallEventToJSONTyped(value?: ToolCallEvent | null, ignoreDiscriminator?: boolean): any;
2837
+
2838
+ /**
2839
+ * Knowledge Search API
2840
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2841
+ *
2842
+ * The version of the OpenAPI document: 1.0.0
2843
+ *
2844
+ *
2845
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2846
+ * https://openapi-generator.tech
2847
+ * Do not edit the class manually.
2848
+ */
2849
+ /**
2850
+ *
2851
+ * @export
2852
+ * @interface ToolErrorEvent
2853
+ */
2854
+ interface ToolErrorEvent {
2855
+ /**
2856
+ *
2857
+ * @type {ToolErrorEventKindEnum}
2858
+ * @memberof ToolErrorEvent
2859
+ */
2860
+ kind?: ToolErrorEventKindEnum;
2861
+ /**
2862
+ *
2863
+ * @type {string}
2864
+ * @memberof ToolErrorEvent
2865
+ */
2866
+ id: string;
2867
+ /**
2868
+ *
2869
+ * @type {string}
2870
+ * @memberof ToolErrorEvent
2871
+ */
2872
+ tool: string;
2873
+ /**
2874
+ *
2875
+ * @type {string}
2876
+ * @memberof ToolErrorEvent
2877
+ */
2878
+ error: string;
2879
+ /**
2880
+ *
2881
+ * @type {string}
2882
+ * @memberof ToolErrorEvent
2883
+ */
2884
+ parent_id?: string | null;
2885
+ }
2886
+ /**
2887
+ * @export
2888
+ */
2889
+ declare const ToolErrorEventKindEnum: {
2890
+ readonly ToolError: "tool_error";
2891
+ };
2892
+ type ToolErrorEventKindEnum = typeof ToolErrorEventKindEnum[keyof typeof ToolErrorEventKindEnum];
2893
+ /**
2894
+ * Check if a given object implements the ToolErrorEvent interface.
2895
+ */
2896
+ declare function instanceOfToolErrorEvent(value: object): value is ToolErrorEvent;
2897
+ declare function ToolErrorEventFromJSON(json: any): ToolErrorEvent;
2898
+ declare function ToolErrorEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolErrorEvent;
2899
+ declare function ToolErrorEventToJSON(json: any): ToolErrorEvent;
2900
+ declare function ToolErrorEventToJSONTyped(value?: ToolErrorEvent | null, ignoreDiscriminator?: boolean): any;
2901
+
2902
+ /**
2903
+ * Knowledge Search API
2904
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2905
+ *
2906
+ * The version of the OpenAPI document: 1.0.0
2907
+ *
2908
+ *
2909
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2910
+ * https://openapi-generator.tech
2911
+ * Do not edit the class manually.
2912
+ */
2913
+ /**
2914
+ *
2915
+ * @export
2916
+ * @interface ToolResultEvent
2917
+ */
2918
+ interface ToolResultEvent {
2919
+ /**
2920
+ *
2921
+ * @type {ToolResultEventKindEnum}
2922
+ * @memberof ToolResultEvent
2923
+ */
2924
+ kind?: ToolResultEventKindEnum;
2925
+ /**
2926
+ *
2927
+ * @type {string}
2928
+ * @memberof ToolResultEvent
2929
+ */
2930
+ id: string;
2931
+ /**
2932
+ *
2933
+ * @type {string}
2934
+ * @memberof ToolResultEvent
2935
+ */
2936
+ tool: string;
2937
+ /**
2938
+ *
2939
+ * @type {number}
2940
+ * @memberof ToolResultEvent
2941
+ */
2942
+ elapsed_ms?: number;
2943
+ /**
2944
+ *
2945
+ * @type {string}
2946
+ * @memberof ToolResultEvent
2947
+ */
2948
+ link?: string | null;
2949
+ /**
2950
+ *
2951
+ * @type {string}
2952
+ * @memberof ToolResultEvent
2953
+ */
2954
+ parent_id?: string | null;
2955
+ }
2956
+ /**
2957
+ * @export
2958
+ */
2959
+ declare const ToolResultEventKindEnum: {
2960
+ readonly ToolResult: "tool_result";
2961
+ };
2962
+ type ToolResultEventKindEnum = typeof ToolResultEventKindEnum[keyof typeof ToolResultEventKindEnum];
2963
+ /**
2964
+ * Check if a given object implements the ToolResultEvent interface.
2965
+ */
2966
+ declare function instanceOfToolResultEvent(value: object): value is ToolResultEvent;
2967
+ declare function ToolResultEventFromJSON(json: any): ToolResultEvent;
2968
+ declare function ToolResultEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolResultEvent;
2969
+ declare function ToolResultEventToJSON(json: any): ToolResultEvent;
2970
+ declare function ToolResultEventToJSONTyped(value?: ToolResultEvent | null, ignoreDiscriminator?: boolean): any;
2971
+
2972
+ /**
2973
+ * Knowledge Search API
2974
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2975
+ *
2976
+ * The version of the OpenAPI document: 1.0.0
2977
+ *
2978
+ *
2979
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2980
+ * https://openapi-generator.tech
2981
+ * Do not edit the class manually.
2982
+ */
2983
+ /**
2984
+ *
2985
+ * @export
2986
+ * @interface ToolRetryEvent
2987
+ */
2988
+ interface ToolRetryEvent {
2989
+ /**
2990
+ *
2991
+ * @type {ToolRetryEventKindEnum}
2992
+ * @memberof ToolRetryEvent
2993
+ */
2994
+ kind?: ToolRetryEventKindEnum;
2995
+ /**
2996
+ *
2997
+ * @type {string}
2998
+ * @memberof ToolRetryEvent
2999
+ */
3000
+ id: string;
3001
+ /**
3002
+ *
3003
+ * @type {string}
3004
+ * @memberof ToolRetryEvent
3005
+ */
3006
+ tool: string;
3007
+ /**
3008
+ *
3009
+ * @type {string}
3010
+ * @memberof ToolRetryEvent
3011
+ */
3012
+ error: string;
3013
+ /**
3014
+ *
3015
+ * @type {number}
3016
+ * @memberof ToolRetryEvent
3017
+ */
3018
+ elapsed_ms?: number;
3019
+ /**
3020
+ *
3021
+ * @type {string}
3022
+ * @memberof ToolRetryEvent
3023
+ */
3024
+ parent_id?: string | null;
3025
+ }
3026
+ /**
3027
+ * @export
3028
+ */
3029
+ declare const ToolRetryEventKindEnum: {
3030
+ readonly ToolRetry: "tool_retry";
3031
+ };
3032
+ type ToolRetryEventKindEnum = typeof ToolRetryEventKindEnum[keyof typeof ToolRetryEventKindEnum];
3033
+ /**
3034
+ * Check if a given object implements the ToolRetryEvent interface.
3035
+ */
3036
+ declare function instanceOfToolRetryEvent(value: object): value is ToolRetryEvent;
3037
+ declare function ToolRetryEventFromJSON(json: any): ToolRetryEvent;
3038
+ declare function ToolRetryEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolRetryEvent;
3039
+ declare function ToolRetryEventToJSON(json: any): ToolRetryEvent;
3040
+ declare function ToolRetryEventToJSONTyped(value?: ToolRetryEvent | null, ignoreDiscriminator?: boolean): any;
3041
+
3042
+ /**
3043
+ * Knowledge Search API
3044
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
3045
+ *
3046
+ * The version of the OpenAPI document: 1.0.0
3047
+ *
3048
+ *
3049
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3050
+ * https://openapi-generator.tech
3051
+ * Do not edit the class manually.
3052
+ */
3053
+
3054
+ /**
3055
+ * @type Block
3056
+ *
3057
+ * @export
3058
+ */
3059
+ type Block = {
3060
+ kind: 'agent_result';
3061
+ } & AgentResultEvent | {
3062
+ kind: 'data_pipeline_answer';
3063
+ } & DataPipelineAnswerEvent | {
3064
+ kind: 'heartbeat';
3065
+ } & HeartbeatEvent | {
3066
+ kind: 'reasoning';
3067
+ } & ReasoningEvent | {
3068
+ kind: 'status';
3069
+ } & StatusEvent | {
3070
+ kind: 'stream_done';
3071
+ } & StreamDoneEvent | {
3072
+ kind: 'stream_reset';
3073
+ } & StreamResetEvent | {
3074
+ kind: 'subagent';
3075
+ } & SubagentEvent | {
3076
+ kind: 'text';
3077
+ } & TextEvent | {
3078
+ kind: 'tool_call';
3079
+ } & ToolCallEvent | {
3080
+ kind: 'tool_error';
3081
+ } & ToolErrorEvent | {
3082
+ kind: 'tool_result';
3083
+ } & ToolResultEvent | {
3084
+ kind: 'tool_retry';
3085
+ } & ToolRetryEvent;
3086
+ declare function BlockFromJSON(json: any): Block;
3087
+ declare function BlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): Block;
3088
+ declare function BlockToJSON(json: any): any;
3089
+ declare function BlockToJSONTyped(value?: Block | null, ignoreDiscriminator?: boolean): any;
3090
+
3091
+ /**
3092
+ * Knowledge Search API
3093
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
3094
+ *
3095
+ * The version of the OpenAPI document: 1.0.0
3096
+ *
3097
+ *
3098
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3099
+ * https://openapi-generator.tech
3100
+ * Do not edit the class manually.
3101
+ */
3102
+ /**
3103
+ *
3104
+ * @export
3105
+ */
3106
+ declare const StreamCategory: {
3107
+ readonly Content: "content";
3108
+ readonly Activity: "activity";
3109
+ readonly Control: "control";
3110
+ };
3111
+ type StreamCategory = typeof StreamCategory[keyof typeof StreamCategory];
3112
+ declare function instanceOfStreamCategory(value: any): boolean;
3113
+ declare function StreamCategoryFromJSON(json: any): StreamCategory;
3114
+ declare function StreamCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): StreamCategory;
3115
+ declare function StreamCategoryToJSON(value?: StreamCategory | null): any;
3116
+ declare function StreamCategoryToJSONTyped(value: any, ignoreDiscriminator: boolean): StreamCategory;
3117
+
3118
+ /**
3119
+ * Knowledge Search API
3120
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
3121
+ *
3122
+ * The version of the OpenAPI document: 1.0.0
3123
+ *
3124
+ *
3125
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3126
+ * https://openapi-generator.tech
3127
+ * Do not edit the class manually.
3128
+ */
3129
+
3130
+ /**
3131
+ * Public SSE envelope for the Agent run stream. `run_id` is the run/task id
3132
+ * (renamed from the native envelope's `task_id` for resource consistency).
3133
+ *
3134
+ * `seq` is monotonically increasing but NOT contiguous: the public stream omits
3135
+ * internal block kinds, so gaps in `seq` are expected and do not indicate lost
3136
+ * events. Use `seq` only as the resume cursor (`starting_after` / `Last-Event-ID`),
3137
+ * not as a completeness check.
3138
+ * @export
3139
+ * @interface AgentStreamEnvelope
3140
+ */
3141
+ interface AgentStreamEnvelope {
3142
+ /**
3143
+ * Monotonic event sequence number; use as the resume cursor. Values are NOT contiguous — the public stream filters internal block kinds, so gaps are expected and do not mean events were lost.
3144
+ * @type {number}
3145
+ * @memberof AgentStreamEnvelope
3146
+ */
3147
+ seq: number;
3148
+ /**
3149
+ *
3150
+ * @type {string}
3151
+ * @memberof AgentStreamEnvelope
3152
+ */
3153
+ run_id: string;
3154
+ /**
3155
+ *
3156
+ * @type {string}
3157
+ * @memberof AgentStreamEnvelope
3158
+ */
3159
+ thread_id?: string | null;
3160
+ /**
3161
+ *
3162
+ * @type {StreamCategory}
3163
+ * @memberof AgentStreamEnvelope
3164
+ */
3165
+ category: StreamCategory;
3166
+ /**
3167
+ *
3168
+ * @type {Block}
3169
+ * @memberof AgentStreamEnvelope
3170
+ */
3171
+ block: Block;
3172
+ }
3173
+ /**
3174
+ * Check if a given object implements the AgentStreamEnvelope interface.
3175
+ */
3176
+ declare function instanceOfAgentStreamEnvelope(value: object): value is AgentStreamEnvelope;
3177
+ declare function AgentStreamEnvelopeFromJSON(json: any): AgentStreamEnvelope;
3178
+ declare function AgentStreamEnvelopeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentStreamEnvelope;
3179
+ declare function AgentStreamEnvelopeToJSON(json: any): AgentStreamEnvelope;
3180
+ declare function AgentStreamEnvelopeToJSONTyped(value?: AgentStreamEnvelope | null, ignoreDiscriminator?: boolean): any;
3181
+
3182
+ /**
3183
+ * Knowledge Search API
3184
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
3185
+ *
3186
+ * The version of the OpenAPI document: 1.0.0
3187
+ *
3188
+ *
3189
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3190
+ * https://openapi-generator.tech
3191
+ * Do not edit the class manually.
3192
+ */
3193
+
3194
+ /**
3195
+ *
3196
+ * @export
3197
+ * @interface BaseAPIError
3198
+ */
3199
+ interface BaseAPIError {
3200
+ /**
3201
+ *
3202
+ * @type {string}
3203
+ * @memberof BaseAPIError
3204
+ */
3205
+ error_message: string;
3206
+ /**
3207
+ *
3208
+ * @type {APIErrorType}
3209
+ * @memberof BaseAPIError
3210
+ */
3211
+ error_type: APIErrorType;
3212
+ }
3213
+ /**
3214
+ * Check if a given object implements the BaseAPIError interface.
3215
+ */
3216
+ declare function instanceOfBaseAPIError(value: object): value is BaseAPIError;
3217
+ declare function BaseAPIErrorFromJSON(json: any): BaseAPIError;
3218
+ declare function BaseAPIErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): BaseAPIError;
3219
+ declare function BaseAPIErrorToJSON(json: any): BaseAPIError;
3220
+ declare function BaseAPIErrorToJSONTyped(value?: BaseAPIError | null, ignoreDiscriminator?: boolean): any;
3221
+
3222
+ /**
3223
+ * Knowledge Search API
3224
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
3225
+ *
3226
+ * The version of the OpenAPI document: 1.0.0
3227
+ *
3228
+ *
3229
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3230
+ * https://openapi-generator.tech
3231
+ * Do not edit the class manually.
3232
+ */
3233
+
3234
+ /**
3235
+ * A segment of a source index. Within a source index, a segment is a subset of the data.
3236
+ * For connected data, a segment is a subset of connected files. A segment may be used for
3237
+ * multi-tenant data e.g. using a segment per customer.
3238
+ * @export
3239
+ * @interface CardSourceIndexSegment
3240
+ */
3241
+ interface CardSourceIndexSegment {
3242
+ /**
3243
+ *
3244
+ * @type {CardSourceIndex}
3245
+ * @memberof CardSourceIndexSegment
3246
+ */
3247
+ index_type: CardSourceIndex;
3248
+ /**
3249
+ * An ID for a segment of a source index
3250
+ * @type {string}
3251
+ * @memberof CardSourceIndexSegment
3252
+ */
3253
+ segment_id: string;
3254
+ }
3255
+ /**
3256
+ * Check if a given object implements the CardSourceIndexSegment interface.
3257
+ */
3258
+ declare function instanceOfCardSourceIndexSegment(value: object): value is CardSourceIndexSegment;
3259
+ declare function CardSourceIndexSegmentFromJSON(json: any): CardSourceIndexSegment;
3260
+ declare function CardSourceIndexSegmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): CardSourceIndexSegment;
3261
+ declare function CardSourceIndexSegmentToJSON(json: any): CardSourceIndexSegment;
3262
+ declare function CardSourceIndexSegmentToJSONTyped(value?: CardSourceIndexSegment | null, ignoreDiscriminator?: boolean): any;
3263
+
3264
+ /**
3265
+ * Knowledge Search API
3266
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
3267
+ *
3268
+ * The version of the OpenAPI document: 1.0.0
3269
+ *
3270
+ *
3271
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3272
+ * https://openapi-generator.tech
3273
+ * Do not edit the class manually.
3274
+ */
3275
+
3276
+ /**
3277
+ *
3278
+ * @export
3279
+ * @interface CardSourcePrivateIndex
3280
+ */
3281
+ interface CardSourcePrivateIndex {
3282
+ /**
3283
+ *
3284
+ * @type {CardSourceIndex}
3285
+ * @memberof CardSourcePrivateIndex
3286
+ */
3287
+ index_type: CardSourceIndex;
3288
+ /**
3289
+ * An ID for a segment of a source index (optional for private indexes)
3290
+ * @type {string}
3291
+ * @memberof CardSourcePrivateIndex
3292
+ */
3293
+ segment_id?: string | null;
3294
+ /**
3295
+ * An ID for a private index
3296
+ * @type {string}
3297
+ * @memberof CardSourcePrivateIndex
3298
+ */
3299
+ private_index_id: string;
3300
+ }
3301
+ /**
3302
+ * Check if a given object implements the CardSourcePrivateIndex interface.
3303
+ */
3304
+ declare function instanceOfCardSourcePrivateIndex(value: object): value is CardSourcePrivateIndex;
3305
+ declare function CardSourcePrivateIndexFromJSON(json: any): CardSourcePrivateIndex;
3306
+ declare function CardSourcePrivateIndexFromJSONTyped(json: any, ignoreDiscriminator: boolean): CardSourcePrivateIndex;
3307
+ declare function CardSourcePrivateIndexToJSON(json: any): CardSourcePrivateIndex;
3308
+ declare function CardSourcePrivateIndexToJSONTyped(value?: CardSourcePrivateIndex | null, ignoreDiscriminator?: boolean): any;
3309
+
3310
+ /**
3311
+ * Knowledge Search API
3312
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
3313
+ *
3314
+ * The version of the OpenAPI document: 1.0.0
3315
+ *
3316
+ *
3317
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3318
+ * https://openapi-generator.tech
3319
+ * Do not edit the class manually.
3320
+ */
3321
+ /**
3322
+ *
3323
+ * @export
3324
+ * @interface CreateCard400Response
3325
+ */
3326
+ interface CreateCard400Response {
3327
+ /**
3328
+ * The unique ID of the knowledge card
3329
+ * @type {string}
3330
+ * @memberof CreateCard400Response
3331
+ */
3332
+ error: string | null;
3333
+ }
3334
+ /**
3335
+ * Check if a given object implements the CreateCard400Response interface.
3336
+ */
3337
+ declare function instanceOfCreateCard400Response(value: object): value is CreateCard400Response;
3338
+ declare function CreateCard400ResponseFromJSON(json: any): CreateCard400Response;
3339
+ declare function CreateCard400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCard400Response;
3340
+ declare function CreateCard400ResponseToJSON(json: any): CreateCard400Response;
3341
+ declare function CreateCard400ResponseToJSONTyped(value?: CreateCard400Response | null, ignoreDiscriminator?: boolean): any;
3342
+
3343
+ interface AgentStreamOptions {
3344
+ /** Max reconnect attempts after a transient drop. Default 5. */
3345
+ maxRetries?: number;
3346
+ /** Idle read timeout (ms) before a connection is treated as dropped. Default 120000. */
3347
+ readTimeoutMs?: number;
3348
+ }
3349
+ /**
3350
+ * Auto-reconnecting SSE stream over an agent run. Async-iterates AgentStreamEnvelope.
3351
+ *
3352
+ * const stream = tako.agent.stream({ query: "..." });
3353
+ * try {
3354
+ * for await (const event of stream) { ... }
3355
+ * } finally {
3356
+ * await stream.close();
3357
+ * }
3358
+ */
3359
+ declare class AgentStream implements AsyncIterable<AgentStreamEnvelope> {
3360
+ run_id: string | null;
3361
+ last_seq: number;
3362
+ result: AgentResult | null;
3363
+ private readonly base;
3364
+ private readonly request;
3365
+ private readonly maxRetries;
3366
+ private readonly readTimeoutMs;
3367
+ private readonly apiKeyFn?;
3368
+ private controller;
3369
+ private reader;
3370
+ private buffer;
3371
+ private closed;
3372
+ private decoder;
3373
+ constructor(config: Configuration, request: AgentRunRequest, options?: AgentStreamOptions);
3374
+ private headers;
3375
+ private open;
3376
+ private dispatch;
3377
+ private reconnect;
3378
+ private closeConnection;
3379
+ /** Read one chunk, racing an idle-timeout abort. Returns null at end of stream. */
3380
+ private readChunk;
3381
+ /** Pull the next complete SSE frame's data payload from the buffer, or null if none yet. */
3382
+ private nextFrameData;
3383
+ [Symbol.asyncIterator](): AsyncIterator<AgentStreamEnvelope>;
3384
+ /** Close the underlying connection. Always call this (or use try/finally). */
3385
+ close(): Promise<void>;
3386
+ }
3387
+
3388
+ /** Agent run operations: dispatch, poll, and live-stream. */
3389
+ declare class AgentResource {
3390
+ private readonly config;
3391
+ private readonly api;
3392
+ constructor(config: Configuration);
3393
+ /** Dispatch a new agent run (202). Returns the AgentRun handle. */
3394
+ run(request: AgentRunRequest): Promise<AgentRun>;
3395
+ /** Poll a run's status. `startingAfter` replays events after that seq (JSON mode). */
3396
+ get(runId: string, startingAfter?: number): Promise<AgentRun>;
3397
+ /** Open a live SSE stream over a new agent run. */
3398
+ stream(request: AgentRunRequest, options?: AgentStreamOptions): AgentStream;
3399
+ }
3400
+
3401
+ interface TakoOptions {
3402
+ /** Tako API key (sent as the X-API-Key header). */
3403
+ apiKey: string;
3404
+ /** API base path. Defaults to https://tako.com/api. */
3405
+ basePath?: string;
3406
+ }
3407
+ /** Ergonomic Tako client. Build once, then call operations directly. */
3408
+ declare class Tako {
3409
+ readonly config: Configuration;
3410
+ readonly agent: AgentResource;
3411
+ private readonly api;
3412
+ constructor(options: TakoOptions);
3413
+ search(request: SearchRequest): Promise<SearchResponse>;
3414
+ answer(request: SearchRequest): Promise<AnswerResponse>;
3415
+ contents(request: ContentsRequest): Promise<ContentsResponse>;
3416
+ createCard(request: CreateCardRequest): Promise<KnowledgeCard>;
3417
+ }
98
3418
 
99
- export { KnowledgeCard, KnowledgeSearchInput, KnowledgeSearchRequest, KnowledgeSearchResponse, Methodology, Source, SourceIndex, TakoConfig, TakoError, TakoException, TakoRateLimitException, TakoUnauthorizedException, createTakoClient };
3419
+ export { APIErrorType, APIErrorTypeFromJSON, APIErrorTypeFromJSONTyped, APIErrorTypeToJSON, APIErrorTypeToJSONTyped, AgentApi, type AgentApiInterface, AgentEffortLevel, AgentEffortLevelFromJSON, AgentEffortLevelFromJSONTyped, AgentEffortLevelToJSON, AgentEffortLevelToJSONTyped, type AgentOutputSettings, AgentOutputSettingsFromJSON, AgentOutputSettingsFromJSONTyped, AgentOutputSettingsToJSON, AgentOutputSettingsToJSONTyped, AgentResource, type AgentResult, type AgentResultEvent, AgentResultEventFromJSON, AgentResultEventFromJSONTyped, AgentResultEventKindEnum, AgentResultEventToJSON, AgentResultEventToJSONTyped, AgentResultFromJSON, AgentResultFromJSONTyped, AgentResultToJSON, AgentResultToJSONTyped, type AgentRun, AgentRunFromJSON, AgentRunFromJSONTyped, AgentRunObjectEnum, type AgentRunRequest, AgentRunRequestFromJSON, AgentRunRequestFromJSONTyped, AgentRunRequestSourceIndexesEnum, AgentRunRequestToJSON, AgentRunRequestToJSONTyped, AgentRunStatus, AgentRunStatusFromJSON, AgentRunStatusFromJSONTyped, AgentRunStatusToJSON, AgentRunStatusToJSONTyped, AgentRunToJSON, AgentRunToJSONTyped, AgentStream, type AgentStreamEnvelope, AgentStreamEnvelopeFromJSON, AgentStreamEnvelopeFromJSONTyped, AgentStreamEnvelopeToJSON, AgentStreamEnvelopeToJSONTyped, type AgentStreamOptions, type AnswerRequest, type AnswerResponse, AnswerResponseFromJSON, AnswerResponseFromJSONTyped, AnswerResponseToJSON, AnswerResponseToJSONTyped, type ApiResponse, BASE_PATH, BaseAPI, type BaseAPIError, BaseAPIErrorFromJSON, BaseAPIErrorFromJSONTyped, BaseAPIErrorToJSON, BaseAPIErrorToJSONTyped, BlobApiResponse, type Block, BlockFromJSON, BlockFromJSONTyped, BlockToJSON, BlockToJSONTyped, COLLECTION_FORMATS, CardSourceIndex, CardSourceIndexFromJSON, CardSourceIndexFromJSONTyped, type CardSourceIndexSegment, CardSourceIndexSegmentFromJSON, CardSourceIndexSegmentFromJSONTyped, CardSourceIndexSegmentToJSON, CardSourceIndexSegmentToJSONTyped, CardSourceIndexToJSON, CardSourceIndexToJSONTyped, type CardSourcePrivateIndex, CardSourcePrivateIndexFromJSON, CardSourcePrivateIndexFromJSONTyped, CardSourcePrivateIndexToJSON, CardSourcePrivateIndexToJSONTyped, type ComponentConfig, ComponentConfigFromJSON, ComponentConfigFromJSONTyped, ComponentConfigToJSON, ComponentConfigToJSONTyped, ComponentTypeEnum, ComponentTypeEnumFromJSON, ComponentTypeEnumFromJSONTyped, ComponentTypeEnumToJSON, ComponentTypeEnumToJSONTyped, Configuration, type ConfigurationParameters, type Consume, ContentFormat, ContentFormatFromJSON, ContentFormatFromJSONTyped, ContentFormatToJSON, ContentFormatToJSONTyped, type ContentItem, ContentItemFromJSON, ContentItemFromJSONTyped, ContentItemToJSON, ContentItemToJSONTyped, ContentsDeliveryMode, ContentsDeliveryModeFromJSON, ContentsDeliveryModeFromJSONTyped, ContentsDeliveryModeToJSON, ContentsDeliveryModeToJSONTyped, type ContentsOperationRequest, type ContentsRequest, ContentsRequestFromJSON, ContentsRequestFromJSONTyped, ContentsRequestToJSON, ContentsRequestToJSONTyped, type ContentsResponse, ContentsResponseFromJSON, ContentsResponseFromJSONTyped, ContentsResponseToJSON, ContentsResponseToJSONTyped, type CreateAgentRunRequest, type CreateCard400Response, CreateCard400ResponseFromJSON, CreateCard400ResponseFromJSONTyped, CreateCard400ResponseToJSON, CreateCard400ResponseToJSONTyped, type CreateCardOperationRequest, type CreateCardRequest, CreateCardRequestFromJSON, CreateCardRequestFromJSONTyped, CreateCardRequestToJSON, CreateCardRequestToJSONTyped, type DataPipelineAnswerEvent, DataPipelineAnswerEventFromJSON, DataPipelineAnswerEventFromJSONTyped, DataPipelineAnswerEventKindEnum, DataPipelineAnswerEventToJSON, DataPipelineAnswerEventToJSONTyped, DefaultConfig, type ErrorContext, type ErrorObject, ErrorObjectFromJSON, ErrorObjectFromJSONTyped, ErrorObjectToJSON, ErrorObjectToJSONTyped, type FetchAPI, FetchError, type FetchParams, type GetAgentRunRequest, type HTTPBody, type HTTPHeaders, type HTTPMethod, type HTTPQuery, type HTTPRequestInit, type HeartbeatEvent, HeartbeatEventFromJSON, HeartbeatEventFromJSONTyped, HeartbeatEventKindEnum, HeartbeatEventToJSON, HeartbeatEventToJSONTyped, type IdealVizDecision, IdealVizDecisionFromJSON, IdealVizDecisionFromJSONTyped, IdealVizDecisionToJSON, IdealVizDecisionToJSONTyped, type InitOverrideFunction, JSONApiResponse, type Json, type KnowledgeCard, KnowledgeCardFromJSON, KnowledgeCardFromJSONTyped, type KnowledgeCardMethodology, KnowledgeCardMethodologyFromJSON, KnowledgeCardMethodologyFromJSONTyped, KnowledgeCardMethodologyToJSON, KnowledgeCardMethodologyToJSONTyped, KnowledgeCardRelevance, KnowledgeCardRelevanceFromJSON, KnowledgeCardRelevanceFromJSONTyped, KnowledgeCardRelevanceToJSON, KnowledgeCardRelevanceToJSONTyped, type KnowledgeCardSource, KnowledgeCardSourceFromJSON, KnowledgeCardSourceFromJSONTyped, type KnowledgeCardSourceIndexesInner, KnowledgeCardSourceIndexesInnerFromJSON, KnowledgeCardSourceIndexesInnerFromJSONTyped, KnowledgeCardSourceIndexesInnerToJSON, KnowledgeCardSourceIndexesInnerToJSONTyped, KnowledgeCardSourceToJSON, KnowledgeCardSourceToJSONTyped, KnowledgeCardToJSON, KnowledgeCardToJSONTyped, type Middleware, type ModelPropertyNaming, type OutputSettings, OutputSettingsFromJSON, OutputSettingsFromJSONTyped, OutputSettingsToJSON, OutputSettingsToJSONTyped, type ReasoningEvent, ReasoningEventFromJSON, ReasoningEventFromJSONTyped, ReasoningEventKindEnum, ReasoningEventToJSON, ReasoningEventToJSONTyped, type RequestContext, type RequestOpts, RequiredError, type ResponseContext, ResponseError, type ResponseTransformer, type ResultContent, ResultContentFromJSON, ResultContentFromJSONTyped, ResultContentToJSON, ResultContentToJSONTyped, SearchEffortLevel, SearchEffortLevelFromJSON, SearchEffortLevelFromJSONTyped, SearchEffortLevelToJSON, SearchEffortLevelToJSONTyped, type SearchOperationRequest, type SearchRequest, SearchRequestFromJSON, SearchRequestFromJSONTyped, SearchRequestToJSON, SearchRequestToJSONTyped, type SearchResponse, SearchResponseFromJSON, SearchResponseFromJSONTyped, SearchResponseToJSON, SearchResponseToJSONTyped, type SourceIndex, SourceIndexFromJSON, SourceIndexFromJSONTyped, SourceIndexToJSON, SourceIndexToJSONTyped, type SourceSettings, SourceSettingsFromJSON, SourceSettingsFromJSONTyped, SourceSettingsToJSON, SourceSettingsToJSONTyped, type Sources, SourcesFromJSON, SourcesFromJSONTyped, SourcesToJSON, SourcesToJSONTyped, type StatusEvent, StatusEventFromJSON, StatusEventFromJSONTyped, StatusEventKindEnum, StatusEventToJSON, StatusEventToJSONTyped, StreamCategory, StreamCategoryFromJSON, StreamCategoryFromJSONTyped, StreamCategoryToJSON, StreamCategoryToJSONTyped, type StreamDoneEvent, StreamDoneEventFromJSON, StreamDoneEventFromJSONTyped, StreamDoneEventKindEnum, StreamDoneEventToJSON, StreamDoneEventToJSONTyped, type StreamResetEvent, StreamResetEventFromJSON, StreamResetEventFromJSONTyped, StreamResetEventKindEnum, StreamResetEventToJSON, StreamResetEventToJSONTyped, type SubagentEvent, SubagentEventEventEnum, SubagentEventFromJSON, SubagentEventFromJSONTyped, SubagentEventKindEnum, SubagentEventToJSON, SubagentEventToJSONTyped, Tako, TakoApi, type TakoApiInterface, type TakoCard, TakoCardFromJSON, TakoCardFromJSONTyped, TakoCardToJSON, TakoCardToJSONTyped, type TakoOptions, type TakoSourceSettings, TakoSourceSettingsFromJSON, TakoSourceSettingsFromJSONTyped, TakoSourceSettingsToJSON, TakoSourceSettingsToJSONTyped, TextApiResponse, type TextEvent, TextEventFromJSON, TextEventFromJSONTyped, TextEventKindEnum, TextEventToJSON, TextEventToJSONTyped, type ToolCallEvent, ToolCallEventFromJSON, ToolCallEventFromJSONTyped, ToolCallEventKindEnum, ToolCallEventToJSON, ToolCallEventToJSONTyped, type ToolErrorEvent, ToolErrorEventFromJSON, ToolErrorEventFromJSONTyped, ToolErrorEventKindEnum, ToolErrorEventToJSON, ToolErrorEventToJSONTyped, type ToolResultEvent, ToolResultEventFromJSON, ToolResultEventFromJSONTyped, ToolResultEventKindEnum, ToolResultEventToJSON, ToolResultEventToJSONTyped, type ToolRetryEvent, ToolRetryEventFromJSON, ToolRetryEventFromJSONTyped, ToolRetryEventKindEnum, ToolRetryEventToJSON, ToolRetryEventToJSONTyped, VoidApiResponse, type WebResult, WebResultFromJSON, WebResultFromJSONTyped, WebResultToJSON, WebResultToJSONTyped, canConsumeForm, exists, instanceOfAPIErrorType, instanceOfAgentEffortLevel, instanceOfAgentOutputSettings, instanceOfAgentResult, instanceOfAgentResultEvent, instanceOfAgentRun, instanceOfAgentRunRequest, instanceOfAgentRunStatus, instanceOfAgentStreamEnvelope, instanceOfAnswerResponse, instanceOfBaseAPIError, instanceOfCardSourceIndex, instanceOfCardSourceIndexSegment, instanceOfCardSourcePrivateIndex, instanceOfComponentConfig, instanceOfComponentTypeEnum, instanceOfContentFormat, instanceOfContentItem, instanceOfContentsDeliveryMode, instanceOfContentsRequest, instanceOfContentsResponse, instanceOfCreateCard400Response, instanceOfCreateCardRequest, instanceOfDataPipelineAnswerEvent, instanceOfErrorObject, instanceOfHeartbeatEvent, instanceOfIdealVizDecision, instanceOfKnowledgeCard, instanceOfKnowledgeCardMethodology, instanceOfKnowledgeCardRelevance, instanceOfKnowledgeCardSource, instanceOfKnowledgeCardSourceIndexesInner, instanceOfOutputSettings, instanceOfReasoningEvent, instanceOfResultContent, instanceOfSearchEffortLevel, instanceOfSearchRequest, instanceOfSearchResponse, instanceOfSourceIndex, instanceOfSourceSettings, instanceOfSources, instanceOfStatusEvent, instanceOfStreamCategory, instanceOfStreamDoneEvent, instanceOfStreamResetEvent, instanceOfSubagentEvent, instanceOfTakoCard, instanceOfTakoSourceSettings, instanceOfTextEvent, instanceOfToolCallEvent, instanceOfToolErrorEvent, instanceOfToolResultEvent, instanceOfToolRetryEvent, instanceOfWebResult, mapValues, querystring };