tako-sdk 1.0.4 → 1.0.6

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
@@ -975,95 +975,6 @@ function AnswerResponseToJSONTyped(value, ignoreDiscriminator = false) {
975
975
  };
976
976
  }
977
977
 
978
- // src/generated/models/ClassifyRequest.ts
979
- function instanceOfClassifyRequest(value) {
980
- if (!("queries" in value) || value["queries"] === void 0) return false;
981
- return true;
982
- }
983
- function ClassifyRequestFromJSON(json) {
984
- return ClassifyRequestFromJSONTyped(json, false);
985
- }
986
- function ClassifyRequestFromJSONTyped(json, ignoreDiscriminator) {
987
- if (json == null) {
988
- return json;
989
- }
990
- return {
991
- "queries": json["queries"]
992
- };
993
- }
994
- function ClassifyRequestToJSON(json) {
995
- return ClassifyRequestToJSONTyped(json, false);
996
- }
997
- function ClassifyRequestToJSONTyped(value, ignoreDiscriminator = false) {
998
- if (value == null) {
999
- return value;
1000
- }
1001
- return {
1002
- "queries": value["queries"]
1003
- };
1004
- }
1005
-
1006
- // src/generated/models/QueryClassification.ts
1007
- function instanceOfQueryClassification(value) {
1008
- if (!("query" in value) || value["query"] === void 0) return false;
1009
- if (!("score" in value) || value["score"] === void 0) return false;
1010
- if (!("keep" in value) || value["keep"] === void 0) return false;
1011
- return true;
1012
- }
1013
- function QueryClassificationFromJSON(json) {
1014
- return QueryClassificationFromJSONTyped(json, false);
1015
- }
1016
- function QueryClassificationFromJSONTyped(json, ignoreDiscriminator) {
1017
- if (json == null) {
1018
- return json;
1019
- }
1020
- return {
1021
- "query": json["query"],
1022
- "score": json["score"],
1023
- "keep": json["keep"]
1024
- };
1025
- }
1026
- function QueryClassificationToJSON(json) {
1027
- return QueryClassificationToJSONTyped(json, false);
1028
- }
1029
- function QueryClassificationToJSONTyped(value, ignoreDiscriminator = false) {
1030
- if (value == null) {
1031
- return value;
1032
- }
1033
- return {
1034
- "query": value["query"],
1035
- "score": value["score"],
1036
- "keep": value["keep"]
1037
- };
1038
- }
1039
-
1040
- // src/generated/models/ClassifyResponse.ts
1041
- function instanceOfClassifyResponse(value) {
1042
- return true;
1043
- }
1044
- function ClassifyResponseFromJSON(json) {
1045
- return ClassifyResponseFromJSONTyped(json, false);
1046
- }
1047
- function ClassifyResponseFromJSONTyped(json, ignoreDiscriminator) {
1048
- if (json == null) {
1049
- return json;
1050
- }
1051
- return {
1052
- "results": json["results"] == null ? void 0 : json["results"].map(QueryClassificationFromJSON)
1053
- };
1054
- }
1055
- function ClassifyResponseToJSON(json) {
1056
- return ClassifyResponseToJSONTyped(json, false);
1057
- }
1058
- function ClassifyResponseToJSONTyped(value, ignoreDiscriminator = false) {
1059
- if (value == null) {
1060
- return value;
1061
- }
1062
- return {
1063
- "results": value["results"] == null ? void 0 : value["results"].map(QueryClassificationToJSON)
1064
- };
1065
- }
1066
-
1067
978
  // src/generated/models/ContentsDeliveryMode.ts
1068
979
  var ContentsDeliveryMode = {
1069
980
  Url: "url",
@@ -1316,6 +1227,346 @@ function CreateCardRequestToJSONTyped(value, ignoreDiscriminator = false) {
1316
1227
  };
1317
1228
  }
1318
1229
 
1230
+ // src/generated/models/EntityClassName.ts
1231
+ var EntityClassName = {
1232
+ Companies: "Companies",
1233
+ Cryptocurrencies: "Cryptocurrencies",
1234
+ FinancialInstruments: "Financial Instruments",
1235
+ InternetBrowsers: "Internet Browsers",
1236
+ Commodities: "Commodities",
1237
+ People: "People",
1238
+ Currencies: "Currencies",
1239
+ StockExchanges: "Stock Exchanges",
1240
+ Securities: "Securities",
1241
+ Ipos: "IPOs",
1242
+ GovernmentDebtInstruments: "Government Debt Instruments",
1243
+ TreasurySecurities: "Treasury Securities",
1244
+ Airports: "Airports",
1245
+ Airlines: "Airlines",
1246
+ VehicleTypes: "Vehicle Types",
1247
+ TransportationModes: "Transportation Modes",
1248
+ Drugs: "Drugs",
1249
+ DrugCategories: "Drug Categories",
1250
+ Diseases: "Diseases",
1251
+ ChemicalElements: "Chemical Elements",
1252
+ ChemicalCompounds: "Chemical Compounds",
1253
+ CelestialBodies: "Celestial Bodies",
1254
+ Occupations: "Occupations",
1255
+ SocialMediaPlatforms: "Social Media Platforms",
1256
+ OperatingSystems: "Operating Systems",
1257
+ SearchEngines: "Search Engines",
1258
+ DeviceTypes: "Device Types",
1259
+ Llms: "LLMs",
1260
+ LlmFamilies: "LLM Families",
1261
+ LlmBenchmarks: "LLM Benchmarks",
1262
+ Industries: "Industries",
1263
+ NaicsIndustries: "NAICS Industries",
1264
+ BlsIndustries: "BLS Industries",
1265
+ PscCategories: "PSC Categories",
1266
+ FederalContractors: "Federal Contractors",
1267
+ FederalAgencies: "Federal Agencies",
1268
+ FederalSubagencies: "Federal Subagencies",
1269
+ IceContracts: "ICE Contracts",
1270
+ IceContractors: "ICE Contractors",
1271
+ Elections: "Elections",
1272
+ PoliticalOffices: "Political Offices",
1273
+ Pollsters: "Pollsters",
1274
+ AgriculturalProducts: "Agricultural Products",
1275
+ TobaccoProducts: "Tobacco Products",
1276
+ PredictionMarkets: "Prediction Markets",
1277
+ PredictionEvents: "Prediction Events",
1278
+ RealEstatePropertyTypes: "Real Estate Property Types",
1279
+ Continents: "Continents",
1280
+ WorldRegions: "World Regions",
1281
+ Countries: "Countries",
1282
+ States: "States",
1283
+ Counties: "Counties",
1284
+ MetroAreas: "Metro Areas",
1285
+ Cities: "Cities",
1286
+ F1Drivers: "F1 Drivers",
1287
+ F1Teams: "F1 Teams",
1288
+ F1Circuits: "F1 Circuits",
1289
+ F1Events: "F1 Events",
1290
+ NascarDrivers: "NASCAR Drivers",
1291
+ NascarTeams: "NASCAR Teams",
1292
+ NascarTracks: "NASCAR Tracks",
1293
+ NascarEvents: "NASCAR Events",
1294
+ NascarRaces: "NASCAR Races",
1295
+ NascarOwners: "NASCAR Owners",
1296
+ NascarManufacturers: "NASCAR Manufacturers",
1297
+ SoccerTeams: "Soccer Teams",
1298
+ SoccerPlayers: "Soccer Players",
1299
+ SoccerCompetitions: "Soccer Competitions",
1300
+ SoccerConferences: "Soccer Conferences",
1301
+ BasketballTeams: "Basketball Teams",
1302
+ BasketballPlayers: "Basketball Players",
1303
+ BasketballConferences: "Basketball Conferences",
1304
+ BasketballDivisions: "Basketball Divisions",
1305
+ BaseballTeams: "Baseball Teams",
1306
+ BaseballPlayers: "Baseball Players",
1307
+ BaseballConferences: "Baseball Conferences",
1308
+ BaseballDivisions: "Baseball Divisions",
1309
+ BaseballCompetitions: "Baseball Competitions",
1310
+ FootballTeams: "Football Teams",
1311
+ FootballPlayers: "Football Players",
1312
+ FootballConferences: "Football Conferences",
1313
+ FootballDivisions: "Football Divisions",
1314
+ Sports: "Sports",
1315
+ SportsLeagues: "Sports Leagues"
1316
+ };
1317
+ function instanceOfEntityClassName(value) {
1318
+ for (const key in EntityClassName) {
1319
+ if (Object.prototype.hasOwnProperty.call(EntityClassName, key)) {
1320
+ if (EntityClassName[key] === value) {
1321
+ return true;
1322
+ }
1323
+ }
1324
+ }
1325
+ return false;
1326
+ }
1327
+ function EntityClassNameFromJSON(json) {
1328
+ return EntityClassNameFromJSONTyped(json, false);
1329
+ }
1330
+ function EntityClassNameFromJSONTyped(json, ignoreDiscriminator) {
1331
+ return json;
1332
+ }
1333
+ function EntityClassNameToJSON(value) {
1334
+ return value;
1335
+ }
1336
+ function EntityClassNameToJSONTyped(value, ignoreDiscriminator) {
1337
+ return value;
1338
+ }
1339
+
1340
+ // src/generated/models/GraphNodeType.ts
1341
+ var GraphNodeType = {
1342
+ Source: "source",
1343
+ Metric: "metric",
1344
+ Entity: "entity"
1345
+ };
1346
+ function instanceOfGraphNodeType(value) {
1347
+ for (const key in GraphNodeType) {
1348
+ if (Object.prototype.hasOwnProperty.call(GraphNodeType, key)) {
1349
+ if (GraphNodeType[key] === value) {
1350
+ return true;
1351
+ }
1352
+ }
1353
+ }
1354
+ return false;
1355
+ }
1356
+ function GraphNodeTypeFromJSON(json) {
1357
+ return GraphNodeTypeFromJSONTyped(json, false);
1358
+ }
1359
+ function GraphNodeTypeFromJSONTyped(json, ignoreDiscriminator) {
1360
+ return json;
1361
+ }
1362
+ function GraphNodeTypeToJSON(value) {
1363
+ return value;
1364
+ }
1365
+ function GraphNodeTypeToJSONTyped(value, ignoreDiscriminator) {
1366
+ return value;
1367
+ }
1368
+
1369
+ // src/generated/models/GraphNode.ts
1370
+ function instanceOfGraphNode(value) {
1371
+ if (!("id" in value) || value["id"] === void 0) return false;
1372
+ if (!("type" in value) || value["type"] === void 0) return false;
1373
+ if (!("name" in value) || value["name"] === void 0) return false;
1374
+ return true;
1375
+ }
1376
+ function GraphNodeFromJSON(json) {
1377
+ return GraphNodeFromJSONTyped(json, false);
1378
+ }
1379
+ function GraphNodeFromJSONTyped(json, ignoreDiscriminator) {
1380
+ if (json == null) {
1381
+ return json;
1382
+ }
1383
+ return {
1384
+ "id": json["id"],
1385
+ "type": GraphNodeTypeFromJSON(json["type"]),
1386
+ "name": json["name"],
1387
+ "aliases": json["aliases"] == null ? void 0 : json["aliases"],
1388
+ "description": json["description"] == null ? void 0 : json["description"],
1389
+ "subtype": json["subtype"] == null ? void 0 : EntityClassNameFromJSON(json["subtype"])
1390
+ };
1391
+ }
1392
+ function GraphNodeToJSON(json) {
1393
+ return GraphNodeToJSONTyped(json, false);
1394
+ }
1395
+ function GraphNodeToJSONTyped(value, ignoreDiscriminator = false) {
1396
+ if (value == null) {
1397
+ return value;
1398
+ }
1399
+ return {
1400
+ "id": value["id"],
1401
+ "type": GraphNodeTypeToJSON(value["type"]),
1402
+ "name": value["name"],
1403
+ "aliases": value["aliases"],
1404
+ "description": value["description"],
1405
+ "subtype": EntityClassNameToJSON(value["subtype"])
1406
+ };
1407
+ }
1408
+
1409
+ // src/generated/models/RelationGroup.ts
1410
+ function instanceOfRelationGroup(value) {
1411
+ if (!("items" in value) || value["items"] === void 0) return false;
1412
+ if (!("total" in value) || value["total"] === void 0) return false;
1413
+ return true;
1414
+ }
1415
+ function RelationGroupFromJSON(json) {
1416
+ return RelationGroupFromJSONTyped(json, false);
1417
+ }
1418
+ function RelationGroupFromJSONTyped(json, ignoreDiscriminator) {
1419
+ if (json == null) {
1420
+ return json;
1421
+ }
1422
+ return {
1423
+ "items": json["items"].map(GraphNodeFromJSON),
1424
+ "total": json["total"]
1425
+ };
1426
+ }
1427
+ function RelationGroupToJSON(json) {
1428
+ return RelationGroupToJSONTyped(json, false);
1429
+ }
1430
+ function RelationGroupToJSONTyped(value, ignoreDiscriminator = false) {
1431
+ if (value == null) {
1432
+ return value;
1433
+ }
1434
+ return {
1435
+ "items": value["items"].map(GraphNodeToJSON),
1436
+ "total": value["total"]
1437
+ };
1438
+ }
1439
+
1440
+ // src/generated/models/RelatedGroups.ts
1441
+ function instanceOfRelatedGroups(value) {
1442
+ if (!("sources" in value) || value["sources"] === void 0) return false;
1443
+ if (!("metrics" in value) || value["metrics"] === void 0) return false;
1444
+ if (!("entities" in value) || value["entities"] === void 0) return false;
1445
+ return true;
1446
+ }
1447
+ function RelatedGroupsFromJSON(json) {
1448
+ return RelatedGroupsFromJSONTyped(json, false);
1449
+ }
1450
+ function RelatedGroupsFromJSONTyped(json, ignoreDiscriminator) {
1451
+ if (json == null) {
1452
+ return json;
1453
+ }
1454
+ return {
1455
+ "sources": RelationGroupFromJSON(json["sources"]),
1456
+ "metrics": RelationGroupFromJSON(json["metrics"]),
1457
+ "entities": RelationGroupFromJSON(json["entities"])
1458
+ };
1459
+ }
1460
+ function RelatedGroupsToJSON(json) {
1461
+ return RelatedGroupsToJSONTyped(json, false);
1462
+ }
1463
+ function RelatedGroupsToJSONTyped(value, ignoreDiscriminator = false) {
1464
+ if (value == null) {
1465
+ return value;
1466
+ }
1467
+ return {
1468
+ "sources": RelationGroupToJSON(value["sources"]),
1469
+ "metrics": RelationGroupToJSON(value["metrics"]),
1470
+ "entities": RelationGroupToJSON(value["entities"])
1471
+ };
1472
+ }
1473
+
1474
+ // src/generated/models/GraphRelationPage.ts
1475
+ function instanceOfGraphRelationPage(value) {
1476
+ if (!("relation_type" in value) || value["relation_type"] === void 0) return false;
1477
+ if (!("items" in value) || value["items"] === void 0) return false;
1478
+ if (!("total" in value) || value["total"] === void 0) return false;
1479
+ return true;
1480
+ }
1481
+ function GraphRelationPageFromJSON(json) {
1482
+ return GraphRelationPageFromJSONTyped(json, false);
1483
+ }
1484
+ function GraphRelationPageFromJSONTyped(json, ignoreDiscriminator) {
1485
+ if (json == null) {
1486
+ return json;
1487
+ }
1488
+ return {
1489
+ "relation_type": GraphNodeTypeFromJSON(json["relation_type"]),
1490
+ "items": json["items"].map(GraphNodeFromJSON),
1491
+ "total": json["total"],
1492
+ "next_cursor": json["next_cursor"] == null ? void 0 : json["next_cursor"]
1493
+ };
1494
+ }
1495
+ function GraphRelationPageToJSON(json) {
1496
+ return GraphRelationPageToJSONTyped(json, false);
1497
+ }
1498
+ function GraphRelationPageToJSONTyped(value, ignoreDiscriminator = false) {
1499
+ if (value == null) {
1500
+ return value;
1501
+ }
1502
+ return {
1503
+ "relation_type": GraphNodeTypeToJSON(value["relation_type"]),
1504
+ "items": value["items"].map(GraphNodeToJSON),
1505
+ "total": value["total"],
1506
+ "next_cursor": value["next_cursor"]
1507
+ };
1508
+ }
1509
+
1510
+ // src/generated/models/GraphRelatedResponse.ts
1511
+ function instanceOfGraphRelatedResponse(value) {
1512
+ if (!("node" in value) || value["node"] === void 0) return false;
1513
+ return true;
1514
+ }
1515
+ function GraphRelatedResponseFromJSON(json) {
1516
+ return GraphRelatedResponseFromJSONTyped(json, false);
1517
+ }
1518
+ function GraphRelatedResponseFromJSONTyped(json, ignoreDiscriminator) {
1519
+ if (json == null) {
1520
+ return json;
1521
+ }
1522
+ return {
1523
+ "node": GraphNodeFromJSON(json["node"]),
1524
+ "related": json["related"] == null ? void 0 : RelatedGroupsFromJSON(json["related"]),
1525
+ "relation": json["relation"] == null ? void 0 : GraphRelationPageFromJSON(json["relation"])
1526
+ };
1527
+ }
1528
+ function GraphRelatedResponseToJSON(json) {
1529
+ return GraphRelatedResponseToJSONTyped(json, false);
1530
+ }
1531
+ function GraphRelatedResponseToJSONTyped(value, ignoreDiscriminator = false) {
1532
+ if (value == null) {
1533
+ return value;
1534
+ }
1535
+ return {
1536
+ "node": GraphNodeToJSON(value["node"]),
1537
+ "related": RelatedGroupsToJSON(value["related"]),
1538
+ "relation": GraphRelationPageToJSON(value["relation"])
1539
+ };
1540
+ }
1541
+
1542
+ // src/generated/models/GraphSearchResponse.ts
1543
+ function instanceOfGraphSearchResponse(value) {
1544
+ if (!("results" in value) || value["results"] === void 0) return false;
1545
+ return true;
1546
+ }
1547
+ function GraphSearchResponseFromJSON(json) {
1548
+ return GraphSearchResponseFromJSONTyped(json, false);
1549
+ }
1550
+ function GraphSearchResponseFromJSONTyped(json, ignoreDiscriminator) {
1551
+ if (json == null) {
1552
+ return json;
1553
+ }
1554
+ return {
1555
+ "results": json["results"].map(GraphNodeFromJSON)
1556
+ };
1557
+ }
1558
+ function GraphSearchResponseToJSON(json) {
1559
+ return GraphSearchResponseToJSONTyped(json, false);
1560
+ }
1561
+ function GraphSearchResponseToJSONTyped(value, ignoreDiscriminator = false) {
1562
+ if (value == null) {
1563
+ return value;
1564
+ }
1565
+ return {
1566
+ "results": value["results"].map(GraphNodeToJSON)
1567
+ };
1568
+ }
1569
+
1319
1570
  // src/generated/models/SearchEffortLevel.ts
1320
1571
  var SearchEffortLevel = {
1321
1572
  Fast: "fast",
@@ -1374,37 +1625,6 @@ function OutputSettingsToJSONTyped(value, ignoreDiscriminator = false) {
1374
1625
  };
1375
1626
  }
1376
1627
 
1377
- // src/generated/models/TakoSourceSettings.ts
1378
- function instanceOfTakoSourceSettings(value) {
1379
- return true;
1380
- }
1381
- function TakoSourceSettingsFromJSON(json) {
1382
- return TakoSourceSettingsFromJSONTyped(json, false);
1383
- }
1384
- function TakoSourceSettingsFromJSONTyped(json, ignoreDiscriminator) {
1385
- if (json == null) {
1386
- return json;
1387
- }
1388
- return {
1389
- "count": json["count"] == null ? void 0 : json["count"],
1390
- "include_contents": json["include_contents"] == null ? void 0 : json["include_contents"],
1391
- "defer_data_retrieval": json["defer_data_retrieval"] == null ? void 0 : json["defer_data_retrieval"]
1392
- };
1393
- }
1394
- function TakoSourceSettingsToJSON(json) {
1395
- return TakoSourceSettingsToJSONTyped(json, false);
1396
- }
1397
- function TakoSourceSettingsToJSONTyped(value, ignoreDiscriminator = false) {
1398
- if (value == null) {
1399
- return value;
1400
- }
1401
- return {
1402
- "count": value["count"],
1403
- "include_contents": value["include_contents"],
1404
- "defer_data_retrieval": value["defer_data_retrieval"]
1405
- };
1406
- }
1407
-
1408
1628
  // src/generated/models/SourceSettings.ts
1409
1629
  function instanceOfSourceSettings(value) {
1410
1630
  return true;
@@ -1446,7 +1666,7 @@ function SourcesFromJSONTyped(json, ignoreDiscriminator) {
1446
1666
  return json;
1447
1667
  }
1448
1668
  return {
1449
- "data": json["data"] == null ? void 0 : TakoSourceSettingsFromJSON(json["data"]),
1669
+ "data": json["data"] == null ? void 0 : SourceSettingsFromJSON(json["data"]),
1450
1670
  "web": json["web"] == null ? void 0 : SourceSettingsFromJSON(json["web"])
1451
1671
  };
1452
1672
  }
@@ -1458,7 +1678,7 @@ function SourcesToJSONTyped(value, ignoreDiscriminator = false) {
1458
1678
  return value;
1459
1679
  }
1460
1680
  return {
1461
- "data": TakoSourceSettingsToJSON(value["data"]),
1681
+ "data": SourceSettingsToJSON(value["data"]),
1462
1682
  "web": SourceSettingsToJSON(value["web"])
1463
1683
  };
1464
1684
  }
@@ -1622,42 +1842,6 @@ var TakoApi = class extends BaseAPI {
1622
1842
  const response = await this.answerRaw(requestParameters, initOverrides);
1623
1843
  return await response.value();
1624
1844
  }
1625
- /**
1626
- * Creates request options for classify without sending the request
1627
- */
1628
- async classifyRequestOpts(requestParameters) {
1629
- const queryParameters = {};
1630
- const headerParameters = {};
1631
- headerParameters["Content-Type"] = "application/json";
1632
- if (this.configuration && this.configuration.apiKey) {
1633
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
1634
- }
1635
- let urlPath = `/v1/classify`;
1636
- return {
1637
- path: urlPath,
1638
- method: "POST",
1639
- headers: headerParameters,
1640
- query: queryParameters,
1641
- body: ClassifyRequestToJSON(requestParameters["classifyRequest"])
1642
- };
1643
- }
1644
- /**
1645
- * Score a batch of queries for whether Tako search will return a result. Returns a probability and a recall-skewed keep flag per query. Free; intended for pre-filtering before /v3/search.
1646
- * Classify queries
1647
- */
1648
- async classifyRaw(requestParameters, initOverrides) {
1649
- const requestOptions = await this.classifyRequestOpts(requestParameters);
1650
- const response = await this.request(requestOptions, initOverrides);
1651
- return new JSONApiResponse(response, (jsonValue) => ClassifyResponseFromJSON(jsonValue));
1652
- }
1653
- /**
1654
- * Score a batch of queries for whether Tako search will return a result. Returns a probability and a recall-skewed keep flag per query. Free; intended for pre-filtering before /v3/search.
1655
- * Classify queries
1656
- */
1657
- async classify(requestParameters = {}, initOverrides) {
1658
- const response = await this.classifyRaw(requestParameters, initOverrides);
1659
- return await response.value();
1660
- }
1661
1845
  /**
1662
1846
  * Creates request options for contents without sending the request
1663
1847
  */
@@ -1728,6 +1912,107 @@ var TakoApi = class extends BaseAPI {
1728
1912
  const response = await this.createCardRaw(requestParameters, initOverrides);
1729
1913
  return await response.value();
1730
1914
  }
1915
+ /**
1916
+ * Creates request options for graphRelated without sending the request
1917
+ */
1918
+ async graphRelatedRequestOpts(requestParameters) {
1919
+ if (requestParameters["nodeId"] == null) {
1920
+ throw new RequiredError(
1921
+ "nodeId",
1922
+ 'Required parameter "nodeId" was null or undefined when calling graphRelated().'
1923
+ );
1924
+ }
1925
+ const queryParameters = {};
1926
+ if (requestParameters["nodeId"] != null) {
1927
+ queryParameters["node_id"] = requestParameters["nodeId"];
1928
+ }
1929
+ if (requestParameters["relationType"] != null) {
1930
+ queryParameters["relation_type"] = requestParameters["relationType"];
1931
+ }
1932
+ if (requestParameters["q"] != null) {
1933
+ queryParameters["q"] = requestParameters["q"];
1934
+ }
1935
+ if (requestParameters["cursor"] != null) {
1936
+ queryParameters["cursor"] = requestParameters["cursor"];
1937
+ }
1938
+ if (requestParameters["limit"] != null) {
1939
+ queryParameters["limit"] = requestParameters["limit"];
1940
+ }
1941
+ const headerParameters = {};
1942
+ let urlPath = `/beta/graph/related`;
1943
+ return {
1944
+ path: urlPath,
1945
+ method: "GET",
1946
+ headers: headerParameters,
1947
+ query: queryParameters
1948
+ };
1949
+ }
1950
+ /**
1951
+ * Explore what a node connects to: a source\'s metrics and entities, a metric\'s sources and the entities it\'s tracked for, or an entity\'s available metrics. Use it to find which entity + metric combinations Tako covers, then query /v3/search or /v1/answer for that combination. Pass relation_type + cursor to paginate one facet, and the optional q to narrow that facet by a case-insensitive substring on name/aliases (e.g. metrics for an entity matching \'gdp\'). Public and unauthenticated.
1952
+ * Get a graph node\'s related nodes
1953
+ */
1954
+ async graphRelatedRaw(requestParameters, initOverrides) {
1955
+ const requestOptions = await this.graphRelatedRequestOpts(requestParameters);
1956
+ const response = await this.request(requestOptions, initOverrides);
1957
+ return new JSONApiResponse(response, (jsonValue) => GraphRelatedResponseFromJSON(jsonValue));
1958
+ }
1959
+ /**
1960
+ * Explore what a node connects to: a source\'s metrics and entities, a metric\'s sources and the entities it\'s tracked for, or an entity\'s available metrics. Use it to find which entity + metric combinations Tako covers, then query /v3/search or /v1/answer for that combination. Pass relation_type + cursor to paginate one facet, and the optional q to narrow that facet by a case-insensitive substring on name/aliases (e.g. metrics for an entity matching \'gdp\'). Public and unauthenticated.
1961
+ * Get a graph node\'s related nodes
1962
+ */
1963
+ async graphRelated(requestParameters, initOverrides) {
1964
+ const response = await this.graphRelatedRaw(requestParameters, initOverrides);
1965
+ return await response.value();
1966
+ }
1967
+ /**
1968
+ * Creates request options for graphSearch without sending the request
1969
+ */
1970
+ async graphSearchRequestOpts(requestParameters) {
1971
+ if (requestParameters["q"] == null) {
1972
+ throw new RequiredError(
1973
+ "q",
1974
+ 'Required parameter "q" was null or undefined when calling graphSearch().'
1975
+ );
1976
+ }
1977
+ const queryParameters = {};
1978
+ if (requestParameters["q"] != null) {
1979
+ queryParameters["q"] = requestParameters["q"];
1980
+ }
1981
+ if (requestParameters["types"] != null) {
1982
+ queryParameters["types"] = requestParameters["types"];
1983
+ }
1984
+ if (requestParameters["limit"] != null) {
1985
+ queryParameters["limit"] = requestParameters["limit"];
1986
+ }
1987
+ if (requestParameters["subtype"] != null) {
1988
+ queryParameters["subtype"] = requestParameters["subtype"];
1989
+ }
1990
+ const headerParameters = {};
1991
+ let urlPath = `/beta/graph/search`;
1992
+ return {
1993
+ path: urlPath,
1994
+ method: "GET",
1995
+ headers: headerParameters,
1996
+ query: queryParameters
1997
+ };
1998
+ }
1999
+ /**
2000
+ * Resolve a data source, metric, or entity in Tako\'s data graph by name. Use this to discover and confirm what data exists before querying — e.g. resolve the metric and the entity you care about here, then ask /v3/search or /v1/answer for that specific entity + metric combination. Public and unauthenticated. Note: results are not yet filtered to the production-ready inventory, so a returned metric or entity that is not backed by a production fact table may 404 when passed to /beta/graph/related. Pass subtype to scope results to one entity class (see the subtype enum).
2001
+ * Search the data graph
2002
+ */
2003
+ async graphSearchRaw(requestParameters, initOverrides) {
2004
+ const requestOptions = await this.graphSearchRequestOpts(requestParameters);
2005
+ const response = await this.request(requestOptions, initOverrides);
2006
+ return new JSONApiResponse(response, (jsonValue) => GraphSearchResponseFromJSON(jsonValue));
2007
+ }
2008
+ /**
2009
+ * Resolve a data source, metric, or entity in Tako\'s data graph by name. Use this to discover and confirm what data exists before querying — e.g. resolve the metric and the entity you care about here, then ask /v3/search or /v1/answer for that specific entity + metric combination. Public and unauthenticated. Note: results are not yet filtered to the production-ready inventory, so a returned metric or entity that is not backed by a production fact table may 404 when passed to /beta/graph/related. Pass subtype to scope results to one entity class (see the subtype enum).
2010
+ * Search the data graph
2011
+ */
2012
+ async graphSearch(requestParameters, initOverrides) {
2013
+ const response = await this.graphSearchRaw(requestParameters, initOverrides);
2014
+ return await response.value();
2015
+ }
1731
2016
  /**
1732
2017
  * Creates request options for search without sending the request
1733
2018
  */
@@ -1765,6 +2050,92 @@ var TakoApi = class extends BaseAPI {
1765
2050
  return await response.value();
1766
2051
  }
1767
2052
  };
2053
+ var GraphSearchSubtypeEnum = {
2054
+ Companies: "Companies",
2055
+ Cryptocurrencies: "Cryptocurrencies",
2056
+ FinancialInstruments: "Financial Instruments",
2057
+ InternetBrowsers: "Internet Browsers",
2058
+ Commodities: "Commodities",
2059
+ People: "People",
2060
+ Currencies: "Currencies",
2061
+ StockExchanges: "Stock Exchanges",
2062
+ Securities: "Securities",
2063
+ Ipos: "IPOs",
2064
+ GovernmentDebtInstruments: "Government Debt Instruments",
2065
+ TreasurySecurities: "Treasury Securities",
2066
+ Airports: "Airports",
2067
+ Airlines: "Airlines",
2068
+ VehicleTypes: "Vehicle Types",
2069
+ TransportationModes: "Transportation Modes",
2070
+ Drugs: "Drugs",
2071
+ DrugCategories: "Drug Categories",
2072
+ Diseases: "Diseases",
2073
+ ChemicalElements: "Chemical Elements",
2074
+ ChemicalCompounds: "Chemical Compounds",
2075
+ CelestialBodies: "Celestial Bodies",
2076
+ Occupations: "Occupations",
2077
+ SocialMediaPlatforms: "Social Media Platforms",
2078
+ OperatingSystems: "Operating Systems",
2079
+ SearchEngines: "Search Engines",
2080
+ DeviceTypes: "Device Types",
2081
+ Llms: "LLMs",
2082
+ LlmFamilies: "LLM Families",
2083
+ LlmBenchmarks: "LLM Benchmarks",
2084
+ Industries: "Industries",
2085
+ NaicsIndustries: "NAICS Industries",
2086
+ BlsIndustries: "BLS Industries",
2087
+ PscCategories: "PSC Categories",
2088
+ FederalContractors: "Federal Contractors",
2089
+ FederalAgencies: "Federal Agencies",
2090
+ FederalSubagencies: "Federal Subagencies",
2091
+ IceContracts: "ICE Contracts",
2092
+ IceContractors: "ICE Contractors",
2093
+ Elections: "Elections",
2094
+ PoliticalOffices: "Political Offices",
2095
+ Pollsters: "Pollsters",
2096
+ AgriculturalProducts: "Agricultural Products",
2097
+ TobaccoProducts: "Tobacco Products",
2098
+ PredictionMarkets: "Prediction Markets",
2099
+ PredictionEvents: "Prediction Events",
2100
+ RealEstatePropertyTypes: "Real Estate Property Types",
2101
+ Continents: "Continents",
2102
+ WorldRegions: "World Regions",
2103
+ Countries: "Countries",
2104
+ States: "States",
2105
+ Counties: "Counties",
2106
+ MetroAreas: "Metro Areas",
2107
+ Cities: "Cities",
2108
+ F1Drivers: "F1 Drivers",
2109
+ F1Teams: "F1 Teams",
2110
+ F1Circuits: "F1 Circuits",
2111
+ F1Events: "F1 Events",
2112
+ NascarDrivers: "NASCAR Drivers",
2113
+ NascarTeams: "NASCAR Teams",
2114
+ NascarTracks: "NASCAR Tracks",
2115
+ NascarEvents: "NASCAR Events",
2116
+ NascarRaces: "NASCAR Races",
2117
+ NascarOwners: "NASCAR Owners",
2118
+ NascarManufacturers: "NASCAR Manufacturers",
2119
+ SoccerTeams: "Soccer Teams",
2120
+ SoccerPlayers: "Soccer Players",
2121
+ SoccerCompetitions: "Soccer Competitions",
2122
+ SoccerConferences: "Soccer Conferences",
2123
+ BasketballTeams: "Basketball Teams",
2124
+ BasketballPlayers: "Basketball Players",
2125
+ BasketballConferences: "Basketball Conferences",
2126
+ BasketballDivisions: "Basketball Divisions",
2127
+ BaseballTeams: "Baseball Teams",
2128
+ BaseballPlayers: "Baseball Players",
2129
+ BaseballConferences: "Baseball Conferences",
2130
+ BaseballDivisions: "Baseball Divisions",
2131
+ BaseballCompetitions: "Baseball Competitions",
2132
+ FootballTeams: "Football Teams",
2133
+ FootballPlayers: "Football Players",
2134
+ FootballConferences: "Football Conferences",
2135
+ FootballDivisions: "Football Divisions",
2136
+ Sports: "Sports",
2137
+ SportsLeagues: "Sports Leagues"
2138
+ };
1768
2139
 
1769
2140
  // src/generated/models/APIErrorType.ts
1770
2141
  var APIErrorType = {
@@ -2696,6 +3067,14 @@ var Tako = class {
2696
3067
  createCard(request) {
2697
3068
  return this.api.createCard({ createCardRequest: request });
2698
3069
  }
3070
+ // /beta/graph/search and /beta/graph/related are GET endpoints, so the
3071
+ // generated request type is the query-param object itself (no body wrapper).
3072
+ graphSearch(request) {
3073
+ return this.api.graphSearch(request);
3074
+ }
3075
+ graphRelated(request) {
3076
+ return this.api.graphRelated(request);
3077
+ }
2699
3078
  };
2700
3079
  export {
2701
3080
  APIErrorType,
@@ -2763,14 +3142,6 @@ export {
2763
3142
  BlockToJSON,
2764
3143
  BlockToJSONTyped,
2765
3144
  COLLECTION_FORMATS,
2766
- ClassifyRequestFromJSON,
2767
- ClassifyRequestFromJSONTyped,
2768
- ClassifyRequestToJSON,
2769
- ClassifyRequestToJSONTyped,
2770
- ClassifyResponseFromJSON,
2771
- ClassifyResponseFromJSONTyped,
2772
- ClassifyResponseToJSON,
2773
- ClassifyResponseToJSONTyped,
2774
3145
  ComponentConfigFromJSON,
2775
3146
  ComponentConfigFromJSONTyped,
2776
3147
  ComponentConfigToJSON,
@@ -2817,11 +3188,38 @@ export {
2817
3188
  DataPipelineAnswerEventToJSON,
2818
3189
  DataPipelineAnswerEventToJSONTyped,
2819
3190
  DefaultConfig,
3191
+ EntityClassName,
3192
+ EntityClassNameFromJSON,
3193
+ EntityClassNameFromJSONTyped,
3194
+ EntityClassNameToJSON,
3195
+ EntityClassNameToJSONTyped,
2820
3196
  ErrorObjectFromJSON,
2821
3197
  ErrorObjectFromJSONTyped,
2822
3198
  ErrorObjectToJSON,
2823
3199
  ErrorObjectToJSONTyped,
2824
3200
  FetchError,
3201
+ GraphNodeFromJSON,
3202
+ GraphNodeFromJSONTyped,
3203
+ GraphNodeToJSON,
3204
+ GraphNodeToJSONTyped,
3205
+ GraphNodeType,
3206
+ GraphNodeTypeFromJSON,
3207
+ GraphNodeTypeFromJSONTyped,
3208
+ GraphNodeTypeToJSON,
3209
+ GraphNodeTypeToJSONTyped,
3210
+ GraphRelatedResponseFromJSON,
3211
+ GraphRelatedResponseFromJSONTyped,
3212
+ GraphRelatedResponseToJSON,
3213
+ GraphRelatedResponseToJSONTyped,
3214
+ GraphRelationPageFromJSON,
3215
+ GraphRelationPageFromJSONTyped,
3216
+ GraphRelationPageToJSON,
3217
+ GraphRelationPageToJSONTyped,
3218
+ GraphSearchResponseFromJSON,
3219
+ GraphSearchResponseFromJSONTyped,
3220
+ GraphSearchResponseToJSON,
3221
+ GraphSearchResponseToJSONTyped,
3222
+ GraphSearchSubtypeEnum,
2825
3223
  HeartbeatEventFromJSON,
2826
3224
  HeartbeatEventFromJSONTyped,
2827
3225
  HeartbeatEventKindEnum,
@@ -2841,15 +3239,19 @@ export {
2841
3239
  OutputSettingsFromJSONTyped,
2842
3240
  OutputSettingsToJSON,
2843
3241
  OutputSettingsToJSONTyped,
2844
- QueryClassificationFromJSON,
2845
- QueryClassificationFromJSONTyped,
2846
- QueryClassificationToJSON,
2847
- QueryClassificationToJSONTyped,
2848
3242
  ReasoningEventFromJSON,
2849
3243
  ReasoningEventFromJSONTyped,
2850
3244
  ReasoningEventKindEnum,
2851
3245
  ReasoningEventToJSON,
2852
3246
  ReasoningEventToJSONTyped,
3247
+ RelatedGroupsFromJSON,
3248
+ RelatedGroupsFromJSONTyped,
3249
+ RelatedGroupsToJSON,
3250
+ RelatedGroupsToJSONTyped,
3251
+ RelationGroupFromJSON,
3252
+ RelationGroupFromJSONTyped,
3253
+ RelationGroupToJSON,
3254
+ RelationGroupToJSONTyped,
2853
3255
  RequiredError,
2854
3256
  ResponseError,
2855
3257
  ResultContentFromJSON,
@@ -2918,10 +3320,6 @@ export {
2918
3320
  TakoSourceIndexFromJSONTyped,
2919
3321
  TakoSourceIndexToJSON,
2920
3322
  TakoSourceIndexToJSONTyped,
2921
- TakoSourceSettingsFromJSON,
2922
- TakoSourceSettingsFromJSONTyped,
2923
- TakoSourceSettingsToJSON,
2924
- TakoSourceSettingsToJSONTyped,
2925
3323
  TextApiResponse,
2926
3324
  TextEventFromJSON,
2927
3325
  TextEventFromJSONTyped,
@@ -2972,8 +3370,6 @@ export {
2972
3370
  instanceOfAgentUsage,
2973
3371
  instanceOfAnswerResponse,
2974
3372
  instanceOfBaseAPIError,
2975
- instanceOfClassifyRequest,
2976
- instanceOfClassifyResponse,
2977
3373
  instanceOfComponentConfig,
2978
3374
  instanceOfComponentTypeEnum,
2979
3375
  instanceOfContentFormat,
@@ -2984,13 +3380,20 @@ export {
2984
3380
  instanceOfCreateCard400Response,
2985
3381
  instanceOfCreateCardRequest,
2986
3382
  instanceOfDataPipelineAnswerEvent,
3383
+ instanceOfEntityClassName,
2987
3384
  instanceOfErrorObject,
3385
+ instanceOfGraphNode,
3386
+ instanceOfGraphNodeType,
3387
+ instanceOfGraphRelatedResponse,
3388
+ instanceOfGraphRelationPage,
3389
+ instanceOfGraphSearchResponse,
2988
3390
  instanceOfHeartbeatEvent,
2989
3391
  instanceOfKnowledgeCardMethodology,
2990
3392
  instanceOfKnowledgeCardRelevance,
2991
3393
  instanceOfOutputSettings,
2992
- instanceOfQueryClassification,
2993
3394
  instanceOfReasoningEvent,
3395
+ instanceOfRelatedGroups,
3396
+ instanceOfRelationGroup,
2994
3397
  instanceOfResultContent,
2995
3398
  instanceOfSearchEffortLevel,
2996
3399
  instanceOfSearchRequest,
@@ -3005,7 +3408,6 @@ export {
3005
3408
  instanceOfTakoCard,
3006
3409
  instanceOfTakoCardSource,
3007
3410
  instanceOfTakoSourceIndex,
3008
- instanceOfTakoSourceSettings,
3009
3411
  instanceOfTextEvent,
3010
3412
  instanceOfThinVizCard,
3011
3413
  instanceOfToolCallEvent,