tako-sdk 1.0.2 → 1.0.4

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.js CHANGED
@@ -301,6 +301,33 @@ var TextApiResponse = class {
301
301
  }
302
302
  };
303
303
 
304
+ // src/generated/models/AgentUsage.ts
305
+ function instanceOfAgentUsage(value) {
306
+ return true;
307
+ }
308
+ function AgentUsageFromJSON(json) {
309
+ return AgentUsageFromJSONTyped(json, false);
310
+ }
311
+ function AgentUsageFromJSONTyped(json, ignoreDiscriminator) {
312
+ if (json == null) {
313
+ return json;
314
+ }
315
+ return {
316
+ "usd_cost": json["usd_cost"] == null ? void 0 : json["usd_cost"]
317
+ };
318
+ }
319
+ function AgentUsageToJSON(json) {
320
+ return AgentUsageToJSONTyped(json, false);
321
+ }
322
+ function AgentUsageToJSONTyped(value, ignoreDiscriminator = false) {
323
+ if (value == null) {
324
+ return value;
325
+ }
326
+ return {
327
+ "usd_cost": value["usd_cost"]
328
+ };
329
+ }
330
+
304
331
  // src/generated/models/KnowledgeCardMethodology.ts
305
332
  function instanceOfKnowledgeCardMethodology(value) {
306
333
  if (!("methodology_name" in value) || value["methodology_name"] === void 0) return false;
@@ -332,135 +359,65 @@ function KnowledgeCardMethodologyToJSONTyped(value, ignoreDiscriminator = false)
332
359
  };
333
360
  }
334
361
 
335
- // src/generated/models/CardSourceIndex.ts
336
- var CardSourceIndex = {
337
- Tako: "tako",
338
- Web: "web",
339
- ConnectedData: "connected_data",
340
- TakoDeepV2: "tako_deep_v2"
362
+ // src/generated/models/TakoSourceIndex.ts
363
+ var TakoSourceIndex = {
364
+ Data: "data",
365
+ Web: "web"
341
366
  };
342
- function instanceOfCardSourceIndex(value) {
343
- for (const key in CardSourceIndex) {
344
- if (Object.prototype.hasOwnProperty.call(CardSourceIndex, key)) {
345
- if (CardSourceIndex[key] === value) {
367
+ function instanceOfTakoSourceIndex(value) {
368
+ for (const key in TakoSourceIndex) {
369
+ if (Object.prototype.hasOwnProperty.call(TakoSourceIndex, key)) {
370
+ if (TakoSourceIndex[key] === value) {
346
371
  return true;
347
372
  }
348
373
  }
349
374
  }
350
375
  return false;
351
376
  }
352
- function CardSourceIndexFromJSON(json) {
353
- return CardSourceIndexFromJSONTyped(json, false);
377
+ function TakoSourceIndexFromJSON(json) {
378
+ return TakoSourceIndexFromJSONTyped(json, false);
354
379
  }
355
- function CardSourceIndexFromJSONTyped(json, ignoreDiscriminator) {
380
+ function TakoSourceIndexFromJSONTyped(json, ignoreDiscriminator) {
356
381
  return json;
357
382
  }
358
- function CardSourceIndexToJSON(value) {
383
+ function TakoSourceIndexToJSON(value) {
359
384
  return value;
360
385
  }
361
- function CardSourceIndexToJSONTyped(value, ignoreDiscriminator) {
386
+ function TakoSourceIndexToJSONTyped(value, ignoreDiscriminator) {
362
387
  return value;
363
388
  }
364
389
 
365
- // src/generated/models/KnowledgeCardSourceIndexesInner.ts
366
- function instanceOfKnowledgeCardSourceIndexesInner(value) {
367
- if (!("index_type" in value) || value["index_type"] === void 0) return false;
368
- if (!("segment_id" in value) || value["segment_id"] === void 0) return false;
369
- return true;
370
- }
371
- function KnowledgeCardSourceIndexesInnerFromJSON(json) {
372
- return KnowledgeCardSourceIndexesInnerFromJSONTyped(json, false);
373
- }
374
- function KnowledgeCardSourceIndexesInnerFromJSONTyped(json, ignoreDiscriminator) {
375
- if (json == null) {
376
- return json;
377
- }
378
- return {
379
- "index_type": CardSourceIndexFromJSON(json["index_type"]),
380
- "segment_id": json["segment_id"]
381
- };
382
- }
383
- function KnowledgeCardSourceIndexesInnerToJSON(json) {
384
- return KnowledgeCardSourceIndexesInnerToJSONTyped(json, false);
385
- }
386
- function KnowledgeCardSourceIndexesInnerToJSONTyped(value, ignoreDiscriminator = false) {
387
- if (value == null) {
388
- return value;
389
- }
390
- return {
391
- "index_type": CardSourceIndexToJSON(value["index_type"]),
392
- "segment_id": value["segment_id"]
393
- };
394
- }
395
-
396
- // src/generated/models/SourceIndex.ts
397
- function instanceOfSourceIndex(value) {
398
- if (!("index_type" in value) || value["index_type"] === void 0) return false;
399
- if (!("segment_id" in value) || value["segment_id"] === void 0) return false;
400
- if (!("private_index_id" in value) || value["private_index_id"] === void 0) return false;
401
- return true;
402
- }
403
- function SourceIndexFromJSON(json) {
404
- return SourceIndexFromJSONTyped(json, false);
405
- }
406
- function SourceIndexFromJSONTyped(json, ignoreDiscriminator) {
407
- if (json == null) {
408
- return json;
409
- }
410
- return {
411
- "index_type": CardSourceIndexFromJSON(json["index_type"]),
412
- "segment_id": json["segment_id"],
413
- "private_index_id": json["private_index_id"]
414
- };
415
- }
416
- function SourceIndexToJSON(json) {
417
- return SourceIndexToJSONTyped(json, false);
418
- }
419
- function SourceIndexToJSONTyped(value, ignoreDiscriminator = false) {
420
- if (value == null) {
421
- return value;
422
- }
423
- return {
424
- "index_type": CardSourceIndexToJSON(value["index_type"]),
425
- "segment_id": value["segment_id"],
426
- "private_index_id": value["private_index_id"]
427
- };
428
- }
429
-
430
- // src/generated/models/KnowledgeCardSource.ts
431
- function instanceOfKnowledgeCardSource(value) {
432
- if (!("source_name" in value) || value["source_name"] === void 0) return false;
433
- if (!("source_description" in value) || value["source_description"] === void 0) return false;
390
+ // src/generated/models/TakoCardSource.ts
391
+ function instanceOfTakoCardSource(value) {
434
392
  if (!("source_index" in value) || value["source_index"] === void 0) return false;
435
- if (!("url" in value) || value["url"] === void 0) return false;
436
393
  return true;
437
394
  }
438
- function KnowledgeCardSourceFromJSON(json) {
439
- return KnowledgeCardSourceFromJSONTyped(json, false);
395
+ function TakoCardSourceFromJSON(json) {
396
+ return TakoCardSourceFromJSONTyped(json, false);
440
397
  }
441
- function KnowledgeCardSourceFromJSONTyped(json, ignoreDiscriminator) {
398
+ function TakoCardSourceFromJSONTyped(json, ignoreDiscriminator) {
442
399
  if (json == null) {
443
400
  return json;
444
401
  }
445
402
  return {
446
- "source_name": json["source_name"],
447
- "source_description": json["source_description"],
448
- "source_index": SourceIndexFromJSON(json["source_index"]),
449
- "url": json["url"],
403
+ "source_name": json["source_name"] == null ? void 0 : json["source_name"],
404
+ "source_description": json["source_description"] == null ? void 0 : json["source_description"],
405
+ "source_index": TakoSourceIndexFromJSON(json["source_index"]),
406
+ "url": json["url"] == null ? void 0 : json["url"],
450
407
  "source_text": json["source_text"] == null ? void 0 : json["source_text"]
451
408
  };
452
409
  }
453
- function KnowledgeCardSourceToJSON(json) {
454
- return KnowledgeCardSourceToJSONTyped(json, false);
410
+ function TakoCardSourceToJSON(json) {
411
+ return TakoCardSourceToJSONTyped(json, false);
455
412
  }
456
- function KnowledgeCardSourceToJSONTyped(value, ignoreDiscriminator = false) {
413
+ function TakoCardSourceToJSONTyped(value, ignoreDiscriminator = false) {
457
414
  if (value == null) {
458
415
  return value;
459
416
  }
460
417
  return {
461
418
  "source_name": value["source_name"],
462
419
  "source_description": value["source_description"],
463
- "source_index": SourceIndexToJSON(value["source_index"]),
420
+ "source_index": TakoSourceIndexToJSON(value["source_index"]),
464
421
  "url": value["url"],
465
422
  "source_text": value["source_text"]
466
423
  };
@@ -578,9 +535,9 @@ function TakoCardFromJSONTyped(json, ignoreDiscriminator) {
578
535
  "webpage_url": json["webpage_url"] == null ? void 0 : json["webpage_url"],
579
536
  "image_url": json["image_url"] == null ? void 0 : json["image_url"],
580
537
  "embed_url": json["embed_url"] == null ? void 0 : json["embed_url"],
581
- "sources": json["sources"] == null ? void 0 : json["sources"].map(KnowledgeCardSourceFromJSON),
538
+ "sources": json["sources"] == null ? void 0 : json["sources"].map(TakoCardSourceFromJSON),
582
539
  "methodologies": json["methodologies"] == null ? void 0 : json["methodologies"].map(KnowledgeCardMethodologyFromJSON),
583
- "source_indexes": json["source_indexes"] == null ? void 0 : json["source_indexes"].map(KnowledgeCardSourceIndexesInnerFromJSON),
540
+ "source_indexes": json["source_indexes"] == null ? void 0 : json["source_indexes"].map(TakoSourceIndexFromJSON),
584
541
  "card_type": json["card_type"] == null ? void 0 : json["card_type"],
585
542
  "relevance": json["relevance"] == null ? void 0 : KnowledgeCardRelevanceFromJSON(json["relevance"]),
586
543
  "content": json["content"] == null ? void 0 : ResultContentFromJSON(json["content"]),
@@ -602,9 +559,9 @@ function TakoCardToJSONTyped(value, ignoreDiscriminator = false) {
602
559
  "webpage_url": value["webpage_url"],
603
560
  "image_url": value["image_url"],
604
561
  "embed_url": value["embed_url"],
605
- "sources": value["sources"] == null ? void 0 : value["sources"].map(KnowledgeCardSourceToJSON),
562
+ "sources": value["sources"] == null ? void 0 : value["sources"].map(TakoCardSourceToJSON),
606
563
  "methodologies": value["methodologies"] == null ? void 0 : value["methodologies"].map(KnowledgeCardMethodologyToJSON),
607
- "source_indexes": value["source_indexes"] == null ? void 0 : value["source_indexes"].map(KnowledgeCardSourceIndexesInnerToJSON),
564
+ "source_indexes": value["source_indexes"] == null ? void 0 : value["source_indexes"].map(TakoSourceIndexToJSON),
608
565
  "card_type": value["card_type"],
609
566
  "relevance": KnowledgeCardRelevanceToJSON(value["relevance"]),
610
567
  "content": ResultContentToJSON(value["content"]),
@@ -686,6 +643,105 @@ function AgentResultToJSONTyped(value, ignoreDiscriminator = false) {
686
643
  };
687
644
  }
688
645
 
646
+ // src/generated/models/AgentEffortLevel.ts
647
+ var AgentEffortLevel = {
648
+ Low: "low",
649
+ Medium: "medium"
650
+ };
651
+ function instanceOfAgentEffortLevel(value) {
652
+ for (const key in AgentEffortLevel) {
653
+ if (Object.prototype.hasOwnProperty.call(AgentEffortLevel, key)) {
654
+ if (AgentEffortLevel[key] === value) {
655
+ return true;
656
+ }
657
+ }
658
+ }
659
+ return false;
660
+ }
661
+ function AgentEffortLevelFromJSON(json) {
662
+ return AgentEffortLevelFromJSONTyped(json, false);
663
+ }
664
+ function AgentEffortLevelFromJSONTyped(json, ignoreDiscriminator) {
665
+ return json;
666
+ }
667
+ function AgentEffortLevelToJSON(value) {
668
+ return value;
669
+ }
670
+ function AgentEffortLevelToJSONTyped(value, ignoreDiscriminator) {
671
+ return value;
672
+ }
673
+
674
+ // src/generated/models/AgentOutputSettings.ts
675
+ function instanceOfAgentOutputSettings(value) {
676
+ return true;
677
+ }
678
+ function AgentOutputSettingsFromJSON(json) {
679
+ return AgentOutputSettingsFromJSONTyped(json, false);
680
+ }
681
+ function AgentOutputSettingsFromJSONTyped(json, ignoreDiscriminator) {
682
+ if (json == null) {
683
+ return json;
684
+ }
685
+ return {
686
+ "image_dark_mode": json["image_dark_mode"] == null ? void 0 : json["image_dark_mode"]
687
+ };
688
+ }
689
+ function AgentOutputSettingsToJSON(json) {
690
+ return AgentOutputSettingsToJSONTyped(json, false);
691
+ }
692
+ function AgentOutputSettingsToJSONTyped(value, ignoreDiscriminator = false) {
693
+ if (value == null) {
694
+ return value;
695
+ }
696
+ return {
697
+ "image_dark_mode": value["image_dark_mode"]
698
+ };
699
+ }
700
+
701
+ // src/generated/models/AgentRunRequest.ts
702
+ var AgentRunRequestSourceIndexesEnum = {
703
+ Data: "data",
704
+ Web: "web"
705
+ };
706
+ function instanceOfAgentRunRequest(value) {
707
+ if (!("query" in value) || value["query"] === void 0) return false;
708
+ return true;
709
+ }
710
+ function AgentRunRequestFromJSON(json) {
711
+ return AgentRunRequestFromJSONTyped(json, false);
712
+ }
713
+ function AgentRunRequestFromJSONTyped(json, ignoreDiscriminator) {
714
+ if (json == null) {
715
+ return json;
716
+ }
717
+ return {
718
+ "query": json["query"],
719
+ "thread_id": json["thread_id"] == null ? void 0 : json["thread_id"],
720
+ "effort": json["effort"] == null ? void 0 : AgentEffortLevelFromJSON(json["effort"]),
721
+ "source_indexes": json["source_indexes"] == null ? void 0 : json["source_indexes"],
722
+ "locale": json["locale"] == null ? void 0 : json["locale"],
723
+ "timezone": json["timezone"] == null ? void 0 : json["timezone"],
724
+ "output_settings": json["output_settings"] == null ? void 0 : AgentOutputSettingsFromJSON(json["output_settings"])
725
+ };
726
+ }
727
+ function AgentRunRequestToJSON(json) {
728
+ return AgentRunRequestToJSONTyped(json, false);
729
+ }
730
+ function AgentRunRequestToJSONTyped(value, ignoreDiscriminator = false) {
731
+ if (value == null) {
732
+ return value;
733
+ }
734
+ return {
735
+ "query": value["query"],
736
+ "thread_id": value["thread_id"],
737
+ "effort": AgentEffortLevelToJSON(value["effort"]),
738
+ "source_indexes": value["source_indexes"],
739
+ "locale": value["locale"],
740
+ "timezone": value["timezone"],
741
+ "output_settings": AgentOutputSettingsToJSON(value["output_settings"])
742
+ };
743
+ }
744
+
689
745
  // src/generated/models/AgentRunStatus.ts
690
746
  var AgentRunStatus = {
691
747
  Queued: "queued",
@@ -772,7 +828,9 @@ function AgentRunFromJSONTyped(json, ignoreDiscriminator) {
772
828
  "created_at": json["created_at"],
773
829
  "completed_at": json["completed_at"] == null ? void 0 : json["completed_at"],
774
830
  "result": json["result"] == null ? void 0 : AgentResultFromJSON(json["result"]),
775
- "error": json["error"] == null ? void 0 : ErrorObjectFromJSON(json["error"])
831
+ "error": json["error"] == null ? void 0 : ErrorObjectFromJSON(json["error"]),
832
+ "usage": json["usage"] == null ? void 0 : AgentUsageFromJSON(json["usage"]),
833
+ "request": json["request"] == null ? void 0 : AgentRunRequestFromJSON(json["request"])
776
834
  };
777
835
  }
778
836
  function AgentRunToJSON(json) {
@@ -790,105 +848,9 @@ function AgentRunToJSONTyped(value, ignoreDiscriminator = false) {
790
848
  "created_at": value["created_at"],
791
849
  "completed_at": value["completed_at"],
792
850
  "result": AgentResultToJSON(value["result"]),
793
- "error": ErrorObjectToJSON(value["error"])
794
- };
795
- }
796
-
797
- // src/generated/models/AgentEffortLevel.ts
798
- var AgentEffortLevel = {
799
- Medium: "medium"
800
- };
801
- function instanceOfAgentEffortLevel(value) {
802
- for (const key in AgentEffortLevel) {
803
- if (Object.prototype.hasOwnProperty.call(AgentEffortLevel, key)) {
804
- if (AgentEffortLevel[key] === value) {
805
- return true;
806
- }
807
- }
808
- }
809
- return false;
810
- }
811
- function AgentEffortLevelFromJSON(json) {
812
- return AgentEffortLevelFromJSONTyped(json, false);
813
- }
814
- function AgentEffortLevelFromJSONTyped(json, ignoreDiscriminator) {
815
- return json;
816
- }
817
- function AgentEffortLevelToJSON(value) {
818
- return value;
819
- }
820
- function AgentEffortLevelToJSONTyped(value, ignoreDiscriminator) {
821
- return value;
822
- }
823
-
824
- // src/generated/models/AgentOutputSettings.ts
825
- function instanceOfAgentOutputSettings(value) {
826
- return true;
827
- }
828
- function AgentOutputSettingsFromJSON(json) {
829
- return AgentOutputSettingsFromJSONTyped(json, false);
830
- }
831
- function AgentOutputSettingsFromJSONTyped(json, ignoreDiscriminator) {
832
- if (json == null) {
833
- return json;
834
- }
835
- return {
836
- "image_dark_mode": json["image_dark_mode"] == null ? void 0 : json["image_dark_mode"]
837
- };
838
- }
839
- function AgentOutputSettingsToJSON(json) {
840
- return AgentOutputSettingsToJSONTyped(json, false);
841
- }
842
- function AgentOutputSettingsToJSONTyped(value, ignoreDiscriminator = false) {
843
- if (value == null) {
844
- return value;
845
- }
846
- return {
847
- "image_dark_mode": value["image_dark_mode"]
848
- };
849
- }
850
-
851
- // src/generated/models/AgentRunRequest.ts
852
- var AgentRunRequestSourceIndexesEnum = {
853
- Data: "data",
854
- Web: "web"
855
- };
856
- function instanceOfAgentRunRequest(value) {
857
- if (!("query" in value) || value["query"] === void 0) return false;
858
- return true;
859
- }
860
- function AgentRunRequestFromJSON(json) {
861
- return AgentRunRequestFromJSONTyped(json, false);
862
- }
863
- function AgentRunRequestFromJSONTyped(json, ignoreDiscriminator) {
864
- if (json == null) {
865
- return json;
866
- }
867
- return {
868
- "query": json["query"],
869
- "thread_id": json["thread_id"] == null ? void 0 : json["thread_id"],
870
- "effort": json["effort"] == null ? void 0 : AgentEffortLevelFromJSON(json["effort"]),
871
- "source_indexes": json["source_indexes"] == null ? void 0 : json["source_indexes"],
872
- "locale": json["locale"] == null ? void 0 : json["locale"],
873
- "timezone": json["timezone"] == null ? void 0 : json["timezone"],
874
- "output_settings": json["output_settings"] == null ? void 0 : AgentOutputSettingsFromJSON(json["output_settings"])
875
- };
876
- }
877
- function AgentRunRequestToJSON(json) {
878
- return AgentRunRequestToJSONTyped(json, false);
879
- }
880
- function AgentRunRequestToJSONTyped(value, ignoreDiscriminator = false) {
881
- if (value == null) {
882
- return value;
883
- }
884
- return {
885
- "query": value["query"],
886
- "thread_id": value["thread_id"],
887
- "effort": AgentEffortLevelToJSON(value["effort"]),
888
- "source_indexes": value["source_indexes"],
889
- "locale": value["locale"],
890
- "timezone": value["timezone"],
891
- "output_settings": AgentOutputSettingsToJSON(value["output_settings"])
851
+ "error": ErrorObjectToJSON(value["error"]),
852
+ "usage": AgentUsageToJSON(value["usage"]),
853
+ "request": AgentRunRequestToJSON(value["request"])
892
854
  };
893
855
  }
894
856
 
@@ -1354,107 +1316,6 @@ function CreateCardRequestToJSONTyped(value, ignoreDiscriminator = false) {
1354
1316
  };
1355
1317
  }
1356
1318
 
1357
- // src/generated/models/IdealVizDecision.ts
1358
- function instanceOfIdealVizDecision(value) {
1359
- if (!("property_path" in value) || value["property_path"] === void 0) return false;
1360
- if (!("reason" in value) || value["reason"] === void 0) return false;
1361
- return true;
1362
- }
1363
- function IdealVizDecisionFromJSON(json) {
1364
- return IdealVizDecisionFromJSONTyped(json, false);
1365
- }
1366
- function IdealVizDecisionFromJSONTyped(json, ignoreDiscriminator) {
1367
- if (json == null) {
1368
- return json;
1369
- }
1370
- return {
1371
- "property_path": json["property_path"],
1372
- "property_path_display_name": json["property_path_display_name"] == null ? void 0 : json["property_path_display_name"],
1373
- "reason": json["reason"]
1374
- };
1375
- }
1376
- function IdealVizDecisionToJSON(json) {
1377
- return IdealVizDecisionToJSONTyped(json, false);
1378
- }
1379
- function IdealVizDecisionToJSONTyped(value, ignoreDiscriminator = false) {
1380
- if (value == null) {
1381
- return value;
1382
- }
1383
- return {
1384
- "property_path": value["property_path"],
1385
- "property_path_display_name": value["property_path_display_name"],
1386
- "reason": value["reason"]
1387
- };
1388
- }
1389
-
1390
- // src/generated/models/KnowledgeCard.ts
1391
- function instanceOfKnowledgeCard(value) {
1392
- if (!("card_id" in value) || value["card_id"] === void 0) return false;
1393
- if (!("title" in value) || value["title"] === void 0) return false;
1394
- if (!("description" in value) || value["description"] === void 0) return false;
1395
- if (!("webpage_url" in value) || value["webpage_url"] === void 0) return false;
1396
- if (!("image_url" in value) || value["image_url"] === void 0) return false;
1397
- if (!("embed_url" in value) || value["embed_url"] === void 0) return false;
1398
- if (!("sources" in value) || value["sources"] === void 0) return false;
1399
- if (!("methodologies" in value) || value["methodologies"] === void 0) return false;
1400
- if (!("source_indexes" in value) || value["source_indexes"] === void 0) return false;
1401
- if (!("card_type" in value) || value["card_type"] === void 0) return false;
1402
- if (!("data_url" in value) || value["data_url"] === void 0) return false;
1403
- if (!("relevance" in value) || value["relevance"] === void 0) return false;
1404
- if (!("visualization_data" in value) || value["visualization_data"] === void 0) return false;
1405
- return true;
1406
- }
1407
- function KnowledgeCardFromJSON(json) {
1408
- return KnowledgeCardFromJSONTyped(json, false);
1409
- }
1410
- function KnowledgeCardFromJSONTyped(json, ignoreDiscriminator) {
1411
- if (json == null) {
1412
- return json;
1413
- }
1414
- return {
1415
- "card_id": json["card_id"],
1416
- "title": json["title"],
1417
- "description": json["description"],
1418
- "semantic_description": json["semantic_description"] == null ? void 0 : json["semantic_description"],
1419
- "webpage_url": json["webpage_url"],
1420
- "image_url": json["image_url"],
1421
- "embed_url": json["embed_url"],
1422
- "sources": json["sources"] == null ? null : json["sources"].map(KnowledgeCardSourceFromJSON),
1423
- "methodologies": json["methodologies"] == null ? null : json["methodologies"].map(KnowledgeCardMethodologyFromJSON),
1424
- "source_indexes": json["source_indexes"] == null ? null : json["source_indexes"].map(KnowledgeCardSourceIndexesInnerFromJSON),
1425
- "card_type": json["card_type"],
1426
- "data_url": json["data_url"],
1427
- "relevance": KnowledgeCardRelevanceFromJSON(json["relevance"]),
1428
- "visualization_data": json["visualization_data"],
1429
- "ideal_viz_decisions": json["ideal_viz_decisions"] == null ? void 0 : json["ideal_viz_decisions"].map(IdealVizDecisionFromJSON)
1430
- };
1431
- }
1432
- function KnowledgeCardToJSON(json) {
1433
- return KnowledgeCardToJSONTyped(json, false);
1434
- }
1435
- function KnowledgeCardToJSONTyped(value, ignoreDiscriminator = false) {
1436
- if (value == null) {
1437
- return value;
1438
- }
1439
- return {
1440
- "card_id": value["card_id"],
1441
- "title": value["title"],
1442
- "description": value["description"],
1443
- "semantic_description": value["semantic_description"],
1444
- "webpage_url": value["webpage_url"],
1445
- "image_url": value["image_url"],
1446
- "embed_url": value["embed_url"],
1447
- "sources": value["sources"] == null ? null : value["sources"].map(KnowledgeCardSourceToJSON),
1448
- "methodologies": value["methodologies"] == null ? null : value["methodologies"].map(KnowledgeCardMethodologyToJSON),
1449
- "source_indexes": value["source_indexes"] == null ? null : value["source_indexes"].map(KnowledgeCardSourceIndexesInnerToJSON),
1450
- "card_type": value["card_type"],
1451
- "data_url": value["data_url"],
1452
- "relevance": KnowledgeCardRelevanceToJSON(value["relevance"]),
1453
- "visualization_data": value["visualization_data"],
1454
- "ideal_viz_decisions": value["ideal_viz_decisions"] == null ? void 0 : value["ideal_viz_decisions"].map(IdealVizDecisionToJSON)
1455
- };
1456
- }
1457
-
1458
1319
  // src/generated/models/SearchEffortLevel.ts
1459
1320
  var SearchEffortLevel = {
1460
1321
  Fast: "fast",
@@ -1676,6 +1537,53 @@ function SearchResponseToJSONTyped(value, ignoreDiscriminator = false) {
1676
1537
  };
1677
1538
  }
1678
1539
 
1540
+ // src/generated/models/ThinVizCard.ts
1541
+ var ThinVizCardEmbedModeEnum = {
1542
+ Post: "post",
1543
+ Postmessage: "postmessage"
1544
+ };
1545
+ function instanceOfThinVizCard(value) {
1546
+ return true;
1547
+ }
1548
+ function ThinVizCardFromJSON(json) {
1549
+ return ThinVizCardFromJSONTyped(json, false);
1550
+ }
1551
+ function ThinVizCardFromJSONTyped(json, ignoreDiscriminator) {
1552
+ if (json == null) {
1553
+ return json;
1554
+ }
1555
+ return {
1556
+ "card_id": json["card_id"] == null ? void 0 : json["card_id"],
1557
+ "title": json["title"] == null ? void 0 : json["title"],
1558
+ "description": json["description"] == null ? void 0 : json["description"],
1559
+ "webpage_url": json["webpage_url"] == null ? void 0 : json["webpage_url"],
1560
+ "image_url": json["image_url"] == null ? void 0 : json["image_url"],
1561
+ "embed_url": json["embed_url"] == null ? void 0 : json["embed_url"],
1562
+ "card_type": json["card_type"] == null ? void 0 : json["card_type"],
1563
+ "visualization_data": json["visualization_data"] == null ? void 0 : json["visualization_data"],
1564
+ "embed_mode": json["embed_mode"] == null ? void 0 : json["embed_mode"]
1565
+ };
1566
+ }
1567
+ function ThinVizCardToJSON(json) {
1568
+ return ThinVizCardToJSONTyped(json, false);
1569
+ }
1570
+ function ThinVizCardToJSONTyped(value, ignoreDiscriminator = false) {
1571
+ if (value == null) {
1572
+ return value;
1573
+ }
1574
+ return {
1575
+ "card_id": value["card_id"],
1576
+ "title": value["title"],
1577
+ "description": value["description"],
1578
+ "webpage_url": value["webpage_url"],
1579
+ "image_url": value["image_url"],
1580
+ "embed_url": value["embed_url"],
1581
+ "card_type": value["card_type"],
1582
+ "visualization_data": value["visualization_data"],
1583
+ "embed_mode": value["embed_mode"]
1584
+ };
1585
+ }
1586
+
1679
1587
  // src/generated/apis/TakoApi.ts
1680
1588
  var TakoApi = class extends BaseAPI {
1681
1589
  /**
@@ -1811,7 +1719,7 @@ var TakoApi = class extends BaseAPI {
1811
1719
  async createCardRaw(requestParameters, initOverrides) {
1812
1720
  const requestOptions = await this.createCardRequestOpts(requestParameters);
1813
1721
  const response = await this.request(requestOptions, initOverrides);
1814
- return new JSONApiResponse(response, (jsonValue) => KnowledgeCardFromJSON(jsonValue));
1722
+ return new JSONApiResponse(response, (jsonValue) => ThinVizCardFromJSON(jsonValue));
1815
1723
  }
1816
1724
  /**
1817
1725
  * Create a visualization card directly from component configurations. Supported component types: header, generic_timeseries, categorical_bar, stock_boxes, financial_boxes, table.
@@ -1868,7 +1776,8 @@ var APIErrorType = {
1868
1776
  PaymentRequired: "PAYMENT_REQUIRED",
1869
1777
  RequestTimeout: "REQUEST_TIMEOUT",
1870
1778
  Forbidden: "FORBIDDEN",
1871
- NotFound: "NOT_FOUND"
1779
+ NotFound: "NOT_FOUND",
1780
+ ServiceUnavailable: "SERVICE_UNAVAILABLE"
1872
1781
  };
1873
1782
  function instanceOfAPIErrorType(value) {
1874
1783
  for (const key in APIErrorType) {
@@ -2555,70 +2464,6 @@ function BaseAPIErrorToJSONTyped(value, ignoreDiscriminator = false) {
2555
2464
  };
2556
2465
  }
2557
2466
 
2558
- // src/generated/models/CardSourceIndexSegment.ts
2559
- function instanceOfCardSourceIndexSegment(value) {
2560
- if (!("index_type" in value) || value["index_type"] === void 0) return false;
2561
- if (!("segment_id" in value) || value["segment_id"] === void 0) return false;
2562
- return true;
2563
- }
2564
- function CardSourceIndexSegmentFromJSON(json) {
2565
- return CardSourceIndexSegmentFromJSONTyped(json, false);
2566
- }
2567
- function CardSourceIndexSegmentFromJSONTyped(json, ignoreDiscriminator) {
2568
- if (json == null) {
2569
- return json;
2570
- }
2571
- return {
2572
- "index_type": CardSourceIndexFromJSON(json["index_type"]),
2573
- "segment_id": json["segment_id"]
2574
- };
2575
- }
2576
- function CardSourceIndexSegmentToJSON(json) {
2577
- return CardSourceIndexSegmentToJSONTyped(json, false);
2578
- }
2579
- function CardSourceIndexSegmentToJSONTyped(value, ignoreDiscriminator = false) {
2580
- if (value == null) {
2581
- return value;
2582
- }
2583
- return {
2584
- "index_type": CardSourceIndexToJSON(value["index_type"]),
2585
- "segment_id": value["segment_id"]
2586
- };
2587
- }
2588
-
2589
- // src/generated/models/CardSourcePrivateIndex.ts
2590
- function instanceOfCardSourcePrivateIndex(value) {
2591
- if (!("index_type" in value) || value["index_type"] === void 0) return false;
2592
- if (!("private_index_id" in value) || value["private_index_id"] === void 0) return false;
2593
- return true;
2594
- }
2595
- function CardSourcePrivateIndexFromJSON(json) {
2596
- return CardSourcePrivateIndexFromJSONTyped(json, false);
2597
- }
2598
- function CardSourcePrivateIndexFromJSONTyped(json, ignoreDiscriminator) {
2599
- if (json == null) {
2600
- return json;
2601
- }
2602
- return {
2603
- "index_type": CardSourceIndexFromJSON(json["index_type"]),
2604
- "segment_id": json["segment_id"] == null ? void 0 : json["segment_id"],
2605
- "private_index_id": json["private_index_id"]
2606
- };
2607
- }
2608
- function CardSourcePrivateIndexToJSON(json) {
2609
- return CardSourcePrivateIndexToJSONTyped(json, false);
2610
- }
2611
- function CardSourcePrivateIndexToJSONTyped(value, ignoreDiscriminator = false) {
2612
- if (value == null) {
2613
- return value;
2614
- }
2615
- return {
2616
- "index_type": CardSourceIndexToJSON(value["index_type"]),
2617
- "segment_id": value["segment_id"],
2618
- "private_index_id": value["private_index_id"]
2619
- };
2620
- }
2621
-
2622
2467
  // src/generated/models/CreateCard400Response.ts
2623
2468
  function instanceOfCreateCard400Response(value) {
2624
2469
  if (!("error" in value) || value["error"] === void 0) return false;
@@ -2898,6 +2743,10 @@ export {
2898
2743
  AgentStreamEnvelopeFromJSONTyped,
2899
2744
  AgentStreamEnvelopeToJSON,
2900
2745
  AgentStreamEnvelopeToJSONTyped,
2746
+ AgentUsageFromJSON,
2747
+ AgentUsageFromJSONTyped,
2748
+ AgentUsageToJSON,
2749
+ AgentUsageToJSONTyped,
2901
2750
  AnswerResponseFromJSON,
2902
2751
  AnswerResponseFromJSONTyped,
2903
2752
  AnswerResponseToJSON,
@@ -2914,19 +2763,6 @@ export {
2914
2763
  BlockToJSON,
2915
2764
  BlockToJSONTyped,
2916
2765
  COLLECTION_FORMATS,
2917
- CardSourceIndex,
2918
- CardSourceIndexFromJSON,
2919
- CardSourceIndexFromJSONTyped,
2920
- CardSourceIndexSegmentFromJSON,
2921
- CardSourceIndexSegmentFromJSONTyped,
2922
- CardSourceIndexSegmentToJSON,
2923
- CardSourceIndexSegmentToJSONTyped,
2924
- CardSourceIndexToJSON,
2925
- CardSourceIndexToJSONTyped,
2926
- CardSourcePrivateIndexFromJSON,
2927
- CardSourcePrivateIndexFromJSONTyped,
2928
- CardSourcePrivateIndexToJSON,
2929
- CardSourcePrivateIndexToJSONTyped,
2930
2766
  ClassifyRequestFromJSON,
2931
2767
  ClassifyRequestFromJSONTyped,
2932
2768
  ClassifyRequestToJSON,
@@ -2991,13 +2827,7 @@ export {
2991
2827
  HeartbeatEventKindEnum,
2992
2828
  HeartbeatEventToJSON,
2993
2829
  HeartbeatEventToJSONTyped,
2994
- IdealVizDecisionFromJSON,
2995
- IdealVizDecisionFromJSONTyped,
2996
- IdealVizDecisionToJSON,
2997
- IdealVizDecisionToJSONTyped,
2998
2830
  JSONApiResponse,
2999
- KnowledgeCardFromJSON,
3000
- KnowledgeCardFromJSONTyped,
3001
2831
  KnowledgeCardMethodologyFromJSON,
3002
2832
  KnowledgeCardMethodologyFromJSONTyped,
3003
2833
  KnowledgeCardMethodologyToJSON,
@@ -3007,16 +2837,6 @@ export {
3007
2837
  KnowledgeCardRelevanceFromJSONTyped,
3008
2838
  KnowledgeCardRelevanceToJSON,
3009
2839
  KnowledgeCardRelevanceToJSONTyped,
3010
- KnowledgeCardSourceFromJSON,
3011
- KnowledgeCardSourceFromJSONTyped,
3012
- KnowledgeCardSourceIndexesInnerFromJSON,
3013
- KnowledgeCardSourceIndexesInnerFromJSONTyped,
3014
- KnowledgeCardSourceIndexesInnerToJSON,
3015
- KnowledgeCardSourceIndexesInnerToJSONTyped,
3016
- KnowledgeCardSourceToJSON,
3017
- KnowledgeCardSourceToJSONTyped,
3018
- KnowledgeCardToJSON,
3019
- KnowledgeCardToJSONTyped,
3020
2840
  OutputSettingsFromJSON,
3021
2841
  OutputSettingsFromJSONTyped,
3022
2842
  OutputSettingsToJSON,
@@ -3049,10 +2869,6 @@ export {
3049
2869
  SearchResponseFromJSONTyped,
3050
2870
  SearchResponseToJSON,
3051
2871
  SearchResponseToJSONTyped,
3052
- SourceIndexFromJSON,
3053
- SourceIndexFromJSONTyped,
3054
- SourceIndexToJSON,
3055
- SourceIndexToJSONTyped,
3056
2872
  SourceSettingsFromJSON,
3057
2873
  SourceSettingsFromJSONTyped,
3058
2874
  SourceSettingsToJSON,
@@ -3091,8 +2907,17 @@ export {
3091
2907
  TakoApi,
3092
2908
  TakoCardFromJSON,
3093
2909
  TakoCardFromJSONTyped,
2910
+ TakoCardSourceFromJSON,
2911
+ TakoCardSourceFromJSONTyped,
2912
+ TakoCardSourceToJSON,
2913
+ TakoCardSourceToJSONTyped,
3094
2914
  TakoCardToJSON,
3095
2915
  TakoCardToJSONTyped,
2916
+ TakoSourceIndex,
2917
+ TakoSourceIndexFromJSON,
2918
+ TakoSourceIndexFromJSONTyped,
2919
+ TakoSourceIndexToJSON,
2920
+ TakoSourceIndexToJSONTyped,
3096
2921
  TakoSourceSettingsFromJSON,
3097
2922
  TakoSourceSettingsFromJSONTyped,
3098
2923
  TakoSourceSettingsToJSON,
@@ -3103,6 +2928,11 @@ export {
3103
2928
  TextEventKindEnum,
3104
2929
  TextEventToJSON,
3105
2930
  TextEventToJSONTyped,
2931
+ ThinVizCardEmbedModeEnum,
2932
+ ThinVizCardFromJSON,
2933
+ ThinVizCardFromJSONTyped,
2934
+ ThinVizCardToJSON,
2935
+ ThinVizCardToJSONTyped,
3106
2936
  ToolCallEventFromJSON,
3107
2937
  ToolCallEventFromJSONTyped,
3108
2938
  ToolCallEventKindEnum,
@@ -3139,11 +2969,9 @@ export {
3139
2969
  instanceOfAgentRunRequest,
3140
2970
  instanceOfAgentRunStatus,
3141
2971
  instanceOfAgentStreamEnvelope,
2972
+ instanceOfAgentUsage,
3142
2973
  instanceOfAnswerResponse,
3143
2974
  instanceOfBaseAPIError,
3144
- instanceOfCardSourceIndex,
3145
- instanceOfCardSourceIndexSegment,
3146
- instanceOfCardSourcePrivateIndex,
3147
2975
  instanceOfClassifyRequest,
3148
2976
  instanceOfClassifyResponse,
3149
2977
  instanceOfComponentConfig,
@@ -3158,12 +2986,8 @@ export {
3158
2986
  instanceOfDataPipelineAnswerEvent,
3159
2987
  instanceOfErrorObject,
3160
2988
  instanceOfHeartbeatEvent,
3161
- instanceOfIdealVizDecision,
3162
- instanceOfKnowledgeCard,
3163
2989
  instanceOfKnowledgeCardMethodology,
3164
2990
  instanceOfKnowledgeCardRelevance,
3165
- instanceOfKnowledgeCardSource,
3166
- instanceOfKnowledgeCardSourceIndexesInner,
3167
2991
  instanceOfOutputSettings,
3168
2992
  instanceOfQueryClassification,
3169
2993
  instanceOfReasoningEvent,
@@ -3171,7 +2995,6 @@ export {
3171
2995
  instanceOfSearchEffortLevel,
3172
2996
  instanceOfSearchRequest,
3173
2997
  instanceOfSearchResponse,
3174
- instanceOfSourceIndex,
3175
2998
  instanceOfSourceSettings,
3176
2999
  instanceOfSources,
3177
3000
  instanceOfStatusEvent,
@@ -3180,8 +3003,11 @@ export {
3180
3003
  instanceOfStreamResetEvent,
3181
3004
  instanceOfSubagentEvent,
3182
3005
  instanceOfTakoCard,
3006
+ instanceOfTakoCardSource,
3007
+ instanceOfTakoSourceIndex,
3183
3008
  instanceOfTakoSourceSettings,
3184
3009
  instanceOfTextEvent,
3010
+ instanceOfThinVizCard,
3185
3011
  instanceOfToolCallEvent,
3186
3012
  instanceOfToolErrorEvent,
3187
3013
  instanceOfToolResultEvent,