tako-sdk 1.0.4 → 1.0.5
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.cjs +623 -198
- package/dist/index.d.cts +610 -201
- package/dist/index.d.ts +610 -201
- package/dist/index.js +580 -178
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -85,14 +85,6 @@ __export(index_exports, {
|
|
|
85
85
|
BlockToJSON: () => BlockToJSON,
|
|
86
86
|
BlockToJSONTyped: () => BlockToJSONTyped,
|
|
87
87
|
COLLECTION_FORMATS: () => COLLECTION_FORMATS,
|
|
88
|
-
ClassifyRequestFromJSON: () => ClassifyRequestFromJSON,
|
|
89
|
-
ClassifyRequestFromJSONTyped: () => ClassifyRequestFromJSONTyped,
|
|
90
|
-
ClassifyRequestToJSON: () => ClassifyRequestToJSON,
|
|
91
|
-
ClassifyRequestToJSONTyped: () => ClassifyRequestToJSONTyped,
|
|
92
|
-
ClassifyResponseFromJSON: () => ClassifyResponseFromJSON,
|
|
93
|
-
ClassifyResponseFromJSONTyped: () => ClassifyResponseFromJSONTyped,
|
|
94
|
-
ClassifyResponseToJSON: () => ClassifyResponseToJSON,
|
|
95
|
-
ClassifyResponseToJSONTyped: () => ClassifyResponseToJSONTyped,
|
|
96
88
|
ComponentConfigFromJSON: () => ComponentConfigFromJSON,
|
|
97
89
|
ComponentConfigFromJSONTyped: () => ComponentConfigFromJSONTyped,
|
|
98
90
|
ComponentConfigToJSON: () => ComponentConfigToJSON,
|
|
@@ -139,11 +131,38 @@ __export(index_exports, {
|
|
|
139
131
|
DataPipelineAnswerEventToJSON: () => DataPipelineAnswerEventToJSON,
|
|
140
132
|
DataPipelineAnswerEventToJSONTyped: () => DataPipelineAnswerEventToJSONTyped,
|
|
141
133
|
DefaultConfig: () => DefaultConfig,
|
|
134
|
+
EntityClassName: () => EntityClassName,
|
|
135
|
+
EntityClassNameFromJSON: () => EntityClassNameFromJSON,
|
|
136
|
+
EntityClassNameFromJSONTyped: () => EntityClassNameFromJSONTyped,
|
|
137
|
+
EntityClassNameToJSON: () => EntityClassNameToJSON,
|
|
138
|
+
EntityClassNameToJSONTyped: () => EntityClassNameToJSONTyped,
|
|
142
139
|
ErrorObjectFromJSON: () => ErrorObjectFromJSON,
|
|
143
140
|
ErrorObjectFromJSONTyped: () => ErrorObjectFromJSONTyped,
|
|
144
141
|
ErrorObjectToJSON: () => ErrorObjectToJSON,
|
|
145
142
|
ErrorObjectToJSONTyped: () => ErrorObjectToJSONTyped,
|
|
146
143
|
FetchError: () => FetchError,
|
|
144
|
+
GraphNodeFromJSON: () => GraphNodeFromJSON,
|
|
145
|
+
GraphNodeFromJSONTyped: () => GraphNodeFromJSONTyped,
|
|
146
|
+
GraphNodeToJSON: () => GraphNodeToJSON,
|
|
147
|
+
GraphNodeToJSONTyped: () => GraphNodeToJSONTyped,
|
|
148
|
+
GraphNodeType: () => GraphNodeType,
|
|
149
|
+
GraphNodeTypeFromJSON: () => GraphNodeTypeFromJSON,
|
|
150
|
+
GraphNodeTypeFromJSONTyped: () => GraphNodeTypeFromJSONTyped,
|
|
151
|
+
GraphNodeTypeToJSON: () => GraphNodeTypeToJSON,
|
|
152
|
+
GraphNodeTypeToJSONTyped: () => GraphNodeTypeToJSONTyped,
|
|
153
|
+
GraphRelatedResponseFromJSON: () => GraphRelatedResponseFromJSON,
|
|
154
|
+
GraphRelatedResponseFromJSONTyped: () => GraphRelatedResponseFromJSONTyped,
|
|
155
|
+
GraphRelatedResponseToJSON: () => GraphRelatedResponseToJSON,
|
|
156
|
+
GraphRelatedResponseToJSONTyped: () => GraphRelatedResponseToJSONTyped,
|
|
157
|
+
GraphRelationPageFromJSON: () => GraphRelationPageFromJSON,
|
|
158
|
+
GraphRelationPageFromJSONTyped: () => GraphRelationPageFromJSONTyped,
|
|
159
|
+
GraphRelationPageToJSON: () => GraphRelationPageToJSON,
|
|
160
|
+
GraphRelationPageToJSONTyped: () => GraphRelationPageToJSONTyped,
|
|
161
|
+
GraphSearchResponseFromJSON: () => GraphSearchResponseFromJSON,
|
|
162
|
+
GraphSearchResponseFromJSONTyped: () => GraphSearchResponseFromJSONTyped,
|
|
163
|
+
GraphSearchResponseToJSON: () => GraphSearchResponseToJSON,
|
|
164
|
+
GraphSearchResponseToJSONTyped: () => GraphSearchResponseToJSONTyped,
|
|
165
|
+
GraphSearchSubtypeEnum: () => GraphSearchSubtypeEnum,
|
|
147
166
|
HeartbeatEventFromJSON: () => HeartbeatEventFromJSON,
|
|
148
167
|
HeartbeatEventFromJSONTyped: () => HeartbeatEventFromJSONTyped,
|
|
149
168
|
HeartbeatEventKindEnum: () => HeartbeatEventKindEnum,
|
|
@@ -163,15 +182,19 @@ __export(index_exports, {
|
|
|
163
182
|
OutputSettingsFromJSONTyped: () => OutputSettingsFromJSONTyped,
|
|
164
183
|
OutputSettingsToJSON: () => OutputSettingsToJSON,
|
|
165
184
|
OutputSettingsToJSONTyped: () => OutputSettingsToJSONTyped,
|
|
166
|
-
QueryClassificationFromJSON: () => QueryClassificationFromJSON,
|
|
167
|
-
QueryClassificationFromJSONTyped: () => QueryClassificationFromJSONTyped,
|
|
168
|
-
QueryClassificationToJSON: () => QueryClassificationToJSON,
|
|
169
|
-
QueryClassificationToJSONTyped: () => QueryClassificationToJSONTyped,
|
|
170
185
|
ReasoningEventFromJSON: () => ReasoningEventFromJSON,
|
|
171
186
|
ReasoningEventFromJSONTyped: () => ReasoningEventFromJSONTyped,
|
|
172
187
|
ReasoningEventKindEnum: () => ReasoningEventKindEnum,
|
|
173
188
|
ReasoningEventToJSON: () => ReasoningEventToJSON,
|
|
174
189
|
ReasoningEventToJSONTyped: () => ReasoningEventToJSONTyped,
|
|
190
|
+
RelatedGroupsFromJSON: () => RelatedGroupsFromJSON,
|
|
191
|
+
RelatedGroupsFromJSONTyped: () => RelatedGroupsFromJSONTyped,
|
|
192
|
+
RelatedGroupsToJSON: () => RelatedGroupsToJSON,
|
|
193
|
+
RelatedGroupsToJSONTyped: () => RelatedGroupsToJSONTyped,
|
|
194
|
+
RelationGroupFromJSON: () => RelationGroupFromJSON,
|
|
195
|
+
RelationGroupFromJSONTyped: () => RelationGroupFromJSONTyped,
|
|
196
|
+
RelationGroupToJSON: () => RelationGroupToJSON,
|
|
197
|
+
RelationGroupToJSONTyped: () => RelationGroupToJSONTyped,
|
|
175
198
|
RequiredError: () => RequiredError,
|
|
176
199
|
ResponseError: () => ResponseError,
|
|
177
200
|
ResultContentFromJSON: () => ResultContentFromJSON,
|
|
@@ -240,10 +263,6 @@ __export(index_exports, {
|
|
|
240
263
|
TakoSourceIndexFromJSONTyped: () => TakoSourceIndexFromJSONTyped,
|
|
241
264
|
TakoSourceIndexToJSON: () => TakoSourceIndexToJSON,
|
|
242
265
|
TakoSourceIndexToJSONTyped: () => TakoSourceIndexToJSONTyped,
|
|
243
|
-
TakoSourceSettingsFromJSON: () => TakoSourceSettingsFromJSON,
|
|
244
|
-
TakoSourceSettingsFromJSONTyped: () => TakoSourceSettingsFromJSONTyped,
|
|
245
|
-
TakoSourceSettingsToJSON: () => TakoSourceSettingsToJSON,
|
|
246
|
-
TakoSourceSettingsToJSONTyped: () => TakoSourceSettingsToJSONTyped,
|
|
247
266
|
TextApiResponse: () => TextApiResponse,
|
|
248
267
|
TextEventFromJSON: () => TextEventFromJSON,
|
|
249
268
|
TextEventFromJSONTyped: () => TextEventFromJSONTyped,
|
|
@@ -294,8 +313,6 @@ __export(index_exports, {
|
|
|
294
313
|
instanceOfAgentUsage: () => instanceOfAgentUsage,
|
|
295
314
|
instanceOfAnswerResponse: () => instanceOfAnswerResponse,
|
|
296
315
|
instanceOfBaseAPIError: () => instanceOfBaseAPIError,
|
|
297
|
-
instanceOfClassifyRequest: () => instanceOfClassifyRequest,
|
|
298
|
-
instanceOfClassifyResponse: () => instanceOfClassifyResponse,
|
|
299
316
|
instanceOfComponentConfig: () => instanceOfComponentConfig,
|
|
300
317
|
instanceOfComponentTypeEnum: () => instanceOfComponentTypeEnum,
|
|
301
318
|
instanceOfContentFormat: () => instanceOfContentFormat,
|
|
@@ -306,13 +323,20 @@ __export(index_exports, {
|
|
|
306
323
|
instanceOfCreateCard400Response: () => instanceOfCreateCard400Response,
|
|
307
324
|
instanceOfCreateCardRequest: () => instanceOfCreateCardRequest,
|
|
308
325
|
instanceOfDataPipelineAnswerEvent: () => instanceOfDataPipelineAnswerEvent,
|
|
326
|
+
instanceOfEntityClassName: () => instanceOfEntityClassName,
|
|
309
327
|
instanceOfErrorObject: () => instanceOfErrorObject,
|
|
328
|
+
instanceOfGraphNode: () => instanceOfGraphNode,
|
|
329
|
+
instanceOfGraphNodeType: () => instanceOfGraphNodeType,
|
|
330
|
+
instanceOfGraphRelatedResponse: () => instanceOfGraphRelatedResponse,
|
|
331
|
+
instanceOfGraphRelationPage: () => instanceOfGraphRelationPage,
|
|
332
|
+
instanceOfGraphSearchResponse: () => instanceOfGraphSearchResponse,
|
|
310
333
|
instanceOfHeartbeatEvent: () => instanceOfHeartbeatEvent,
|
|
311
334
|
instanceOfKnowledgeCardMethodology: () => instanceOfKnowledgeCardMethodology,
|
|
312
335
|
instanceOfKnowledgeCardRelevance: () => instanceOfKnowledgeCardRelevance,
|
|
313
336
|
instanceOfOutputSettings: () => instanceOfOutputSettings,
|
|
314
|
-
instanceOfQueryClassification: () => instanceOfQueryClassification,
|
|
315
337
|
instanceOfReasoningEvent: () => instanceOfReasoningEvent,
|
|
338
|
+
instanceOfRelatedGroups: () => instanceOfRelatedGroups,
|
|
339
|
+
instanceOfRelationGroup: () => instanceOfRelationGroup,
|
|
316
340
|
instanceOfResultContent: () => instanceOfResultContent,
|
|
317
341
|
instanceOfSearchEffortLevel: () => instanceOfSearchEffortLevel,
|
|
318
342
|
instanceOfSearchRequest: () => instanceOfSearchRequest,
|
|
@@ -327,7 +351,6 @@ __export(index_exports, {
|
|
|
327
351
|
instanceOfTakoCard: () => instanceOfTakoCard,
|
|
328
352
|
instanceOfTakoCardSource: () => instanceOfTakoCardSource,
|
|
329
353
|
instanceOfTakoSourceIndex: () => instanceOfTakoSourceIndex,
|
|
330
|
-
instanceOfTakoSourceSettings: () => instanceOfTakoSourceSettings,
|
|
331
354
|
instanceOfTextEvent: () => instanceOfTextEvent,
|
|
332
355
|
instanceOfThinVizCard: () => instanceOfThinVizCard,
|
|
333
356
|
instanceOfToolCallEvent: () => instanceOfToolCallEvent,
|
|
@@ -1317,95 +1340,6 @@ function AnswerResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1317
1340
|
};
|
|
1318
1341
|
}
|
|
1319
1342
|
|
|
1320
|
-
// src/generated/models/ClassifyRequest.ts
|
|
1321
|
-
function instanceOfClassifyRequest(value) {
|
|
1322
|
-
if (!("queries" in value) || value["queries"] === void 0) return false;
|
|
1323
|
-
return true;
|
|
1324
|
-
}
|
|
1325
|
-
function ClassifyRequestFromJSON(json) {
|
|
1326
|
-
return ClassifyRequestFromJSONTyped(json, false);
|
|
1327
|
-
}
|
|
1328
|
-
function ClassifyRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
1329
|
-
if (json == null) {
|
|
1330
|
-
return json;
|
|
1331
|
-
}
|
|
1332
|
-
return {
|
|
1333
|
-
"queries": json["queries"]
|
|
1334
|
-
};
|
|
1335
|
-
}
|
|
1336
|
-
function ClassifyRequestToJSON(json) {
|
|
1337
|
-
return ClassifyRequestToJSONTyped(json, false);
|
|
1338
|
-
}
|
|
1339
|
-
function ClassifyRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1340
|
-
if (value == null) {
|
|
1341
|
-
return value;
|
|
1342
|
-
}
|
|
1343
|
-
return {
|
|
1344
|
-
"queries": value["queries"]
|
|
1345
|
-
};
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
// src/generated/models/QueryClassification.ts
|
|
1349
|
-
function instanceOfQueryClassification(value) {
|
|
1350
|
-
if (!("query" in value) || value["query"] === void 0) return false;
|
|
1351
|
-
if (!("score" in value) || value["score"] === void 0) return false;
|
|
1352
|
-
if (!("keep" in value) || value["keep"] === void 0) return false;
|
|
1353
|
-
return true;
|
|
1354
|
-
}
|
|
1355
|
-
function QueryClassificationFromJSON(json) {
|
|
1356
|
-
return QueryClassificationFromJSONTyped(json, false);
|
|
1357
|
-
}
|
|
1358
|
-
function QueryClassificationFromJSONTyped(json, ignoreDiscriminator) {
|
|
1359
|
-
if (json == null) {
|
|
1360
|
-
return json;
|
|
1361
|
-
}
|
|
1362
|
-
return {
|
|
1363
|
-
"query": json["query"],
|
|
1364
|
-
"score": json["score"],
|
|
1365
|
-
"keep": json["keep"]
|
|
1366
|
-
};
|
|
1367
|
-
}
|
|
1368
|
-
function QueryClassificationToJSON(json) {
|
|
1369
|
-
return QueryClassificationToJSONTyped(json, false);
|
|
1370
|
-
}
|
|
1371
|
-
function QueryClassificationToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1372
|
-
if (value == null) {
|
|
1373
|
-
return value;
|
|
1374
|
-
}
|
|
1375
|
-
return {
|
|
1376
|
-
"query": value["query"],
|
|
1377
|
-
"score": value["score"],
|
|
1378
|
-
"keep": value["keep"]
|
|
1379
|
-
};
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
// src/generated/models/ClassifyResponse.ts
|
|
1383
|
-
function instanceOfClassifyResponse(value) {
|
|
1384
|
-
return true;
|
|
1385
|
-
}
|
|
1386
|
-
function ClassifyResponseFromJSON(json) {
|
|
1387
|
-
return ClassifyResponseFromJSONTyped(json, false);
|
|
1388
|
-
}
|
|
1389
|
-
function ClassifyResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1390
|
-
if (json == null) {
|
|
1391
|
-
return json;
|
|
1392
|
-
}
|
|
1393
|
-
return {
|
|
1394
|
-
"results": json["results"] == null ? void 0 : json["results"].map(QueryClassificationFromJSON)
|
|
1395
|
-
};
|
|
1396
|
-
}
|
|
1397
|
-
function ClassifyResponseToJSON(json) {
|
|
1398
|
-
return ClassifyResponseToJSONTyped(json, false);
|
|
1399
|
-
}
|
|
1400
|
-
function ClassifyResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1401
|
-
if (value == null) {
|
|
1402
|
-
return value;
|
|
1403
|
-
}
|
|
1404
|
-
return {
|
|
1405
|
-
"results": value["results"] == null ? void 0 : value["results"].map(QueryClassificationToJSON)
|
|
1406
|
-
};
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
1343
|
// src/generated/models/ContentsDeliveryMode.ts
|
|
1410
1344
|
var ContentsDeliveryMode = {
|
|
1411
1345
|
Url: "url",
|
|
@@ -1658,6 +1592,346 @@ function CreateCardRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1658
1592
|
};
|
|
1659
1593
|
}
|
|
1660
1594
|
|
|
1595
|
+
// src/generated/models/EntityClassName.ts
|
|
1596
|
+
var EntityClassName = {
|
|
1597
|
+
Companies: "Companies",
|
|
1598
|
+
Cryptocurrencies: "Cryptocurrencies",
|
|
1599
|
+
FinancialInstruments: "Financial Instruments",
|
|
1600
|
+
InternetBrowsers: "Internet Browsers",
|
|
1601
|
+
Commodities: "Commodities",
|
|
1602
|
+
People: "People",
|
|
1603
|
+
Currencies: "Currencies",
|
|
1604
|
+
StockExchanges: "Stock Exchanges",
|
|
1605
|
+
Securities: "Securities",
|
|
1606
|
+
Ipos: "IPOs",
|
|
1607
|
+
GovernmentDebtInstruments: "Government Debt Instruments",
|
|
1608
|
+
TreasurySecurities: "Treasury Securities",
|
|
1609
|
+
Airports: "Airports",
|
|
1610
|
+
Airlines: "Airlines",
|
|
1611
|
+
VehicleTypes: "Vehicle Types",
|
|
1612
|
+
TransportationModes: "Transportation Modes",
|
|
1613
|
+
Drugs: "Drugs",
|
|
1614
|
+
DrugCategories: "Drug Categories",
|
|
1615
|
+
Diseases: "Diseases",
|
|
1616
|
+
ChemicalElements: "Chemical Elements",
|
|
1617
|
+
ChemicalCompounds: "Chemical Compounds",
|
|
1618
|
+
CelestialBodies: "Celestial Bodies",
|
|
1619
|
+
Occupations: "Occupations",
|
|
1620
|
+
SocialMediaPlatforms: "Social Media Platforms",
|
|
1621
|
+
OperatingSystems: "Operating Systems",
|
|
1622
|
+
SearchEngines: "Search Engines",
|
|
1623
|
+
DeviceTypes: "Device Types",
|
|
1624
|
+
Llms: "LLMs",
|
|
1625
|
+
LlmFamilies: "LLM Families",
|
|
1626
|
+
LlmBenchmarks: "LLM Benchmarks",
|
|
1627
|
+
Industries: "Industries",
|
|
1628
|
+
NaicsIndustries: "NAICS Industries",
|
|
1629
|
+
BlsIndustries: "BLS Industries",
|
|
1630
|
+
PscCategories: "PSC Categories",
|
|
1631
|
+
FederalContractors: "Federal Contractors",
|
|
1632
|
+
FederalAgencies: "Federal Agencies",
|
|
1633
|
+
FederalSubagencies: "Federal Subagencies",
|
|
1634
|
+
IceContracts: "ICE Contracts",
|
|
1635
|
+
IceContractors: "ICE Contractors",
|
|
1636
|
+
Elections: "Elections",
|
|
1637
|
+
PoliticalOffices: "Political Offices",
|
|
1638
|
+
Pollsters: "Pollsters",
|
|
1639
|
+
AgriculturalProducts: "Agricultural Products",
|
|
1640
|
+
TobaccoProducts: "Tobacco Products",
|
|
1641
|
+
PredictionMarkets: "Prediction Markets",
|
|
1642
|
+
PredictionEvents: "Prediction Events",
|
|
1643
|
+
RealEstatePropertyTypes: "Real Estate Property Types",
|
|
1644
|
+
Continents: "Continents",
|
|
1645
|
+
WorldRegions: "World Regions",
|
|
1646
|
+
Countries: "Countries",
|
|
1647
|
+
States: "States",
|
|
1648
|
+
Counties: "Counties",
|
|
1649
|
+
MetroAreas: "Metro Areas",
|
|
1650
|
+
Cities: "Cities",
|
|
1651
|
+
F1Drivers: "F1 Drivers",
|
|
1652
|
+
F1Teams: "F1 Teams",
|
|
1653
|
+
F1Circuits: "F1 Circuits",
|
|
1654
|
+
F1Events: "F1 Events",
|
|
1655
|
+
NascarDrivers: "NASCAR Drivers",
|
|
1656
|
+
NascarTeams: "NASCAR Teams",
|
|
1657
|
+
NascarTracks: "NASCAR Tracks",
|
|
1658
|
+
NascarEvents: "NASCAR Events",
|
|
1659
|
+
NascarRaces: "NASCAR Races",
|
|
1660
|
+
NascarOwners: "NASCAR Owners",
|
|
1661
|
+
NascarManufacturers: "NASCAR Manufacturers",
|
|
1662
|
+
SoccerTeams: "Soccer Teams",
|
|
1663
|
+
SoccerPlayers: "Soccer Players",
|
|
1664
|
+
SoccerCompetitions: "Soccer Competitions",
|
|
1665
|
+
SoccerConferences: "Soccer Conferences",
|
|
1666
|
+
BasketballTeams: "Basketball Teams",
|
|
1667
|
+
BasketballPlayers: "Basketball Players",
|
|
1668
|
+
BasketballConferences: "Basketball Conferences",
|
|
1669
|
+
BasketballDivisions: "Basketball Divisions",
|
|
1670
|
+
BaseballTeams: "Baseball Teams",
|
|
1671
|
+
BaseballPlayers: "Baseball Players",
|
|
1672
|
+
BaseballConferences: "Baseball Conferences",
|
|
1673
|
+
BaseballDivisions: "Baseball Divisions",
|
|
1674
|
+
BaseballCompetitions: "Baseball Competitions",
|
|
1675
|
+
FootballTeams: "Football Teams",
|
|
1676
|
+
FootballPlayers: "Football Players",
|
|
1677
|
+
FootballConferences: "Football Conferences",
|
|
1678
|
+
FootballDivisions: "Football Divisions",
|
|
1679
|
+
Sports: "Sports",
|
|
1680
|
+
SportsLeagues: "Sports Leagues"
|
|
1681
|
+
};
|
|
1682
|
+
function instanceOfEntityClassName(value) {
|
|
1683
|
+
for (const key in EntityClassName) {
|
|
1684
|
+
if (Object.prototype.hasOwnProperty.call(EntityClassName, key)) {
|
|
1685
|
+
if (EntityClassName[key] === value) {
|
|
1686
|
+
return true;
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
return false;
|
|
1691
|
+
}
|
|
1692
|
+
function EntityClassNameFromJSON(json) {
|
|
1693
|
+
return EntityClassNameFromJSONTyped(json, false);
|
|
1694
|
+
}
|
|
1695
|
+
function EntityClassNameFromJSONTyped(json, ignoreDiscriminator) {
|
|
1696
|
+
return json;
|
|
1697
|
+
}
|
|
1698
|
+
function EntityClassNameToJSON(value) {
|
|
1699
|
+
return value;
|
|
1700
|
+
}
|
|
1701
|
+
function EntityClassNameToJSONTyped(value, ignoreDiscriminator) {
|
|
1702
|
+
return value;
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
// src/generated/models/GraphNodeType.ts
|
|
1706
|
+
var GraphNodeType = {
|
|
1707
|
+
Source: "source",
|
|
1708
|
+
Metric: "metric",
|
|
1709
|
+
Entity: "entity"
|
|
1710
|
+
};
|
|
1711
|
+
function instanceOfGraphNodeType(value) {
|
|
1712
|
+
for (const key in GraphNodeType) {
|
|
1713
|
+
if (Object.prototype.hasOwnProperty.call(GraphNodeType, key)) {
|
|
1714
|
+
if (GraphNodeType[key] === value) {
|
|
1715
|
+
return true;
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
return false;
|
|
1720
|
+
}
|
|
1721
|
+
function GraphNodeTypeFromJSON(json) {
|
|
1722
|
+
return GraphNodeTypeFromJSONTyped(json, false);
|
|
1723
|
+
}
|
|
1724
|
+
function GraphNodeTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
1725
|
+
return json;
|
|
1726
|
+
}
|
|
1727
|
+
function GraphNodeTypeToJSON(value) {
|
|
1728
|
+
return value;
|
|
1729
|
+
}
|
|
1730
|
+
function GraphNodeTypeToJSONTyped(value, ignoreDiscriminator) {
|
|
1731
|
+
return value;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
// src/generated/models/GraphNode.ts
|
|
1735
|
+
function instanceOfGraphNode(value) {
|
|
1736
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
1737
|
+
if (!("type" in value) || value["type"] === void 0) return false;
|
|
1738
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
1739
|
+
return true;
|
|
1740
|
+
}
|
|
1741
|
+
function GraphNodeFromJSON(json) {
|
|
1742
|
+
return GraphNodeFromJSONTyped(json, false);
|
|
1743
|
+
}
|
|
1744
|
+
function GraphNodeFromJSONTyped(json, ignoreDiscriminator) {
|
|
1745
|
+
if (json == null) {
|
|
1746
|
+
return json;
|
|
1747
|
+
}
|
|
1748
|
+
return {
|
|
1749
|
+
"id": json["id"],
|
|
1750
|
+
"type": GraphNodeTypeFromJSON(json["type"]),
|
|
1751
|
+
"name": json["name"],
|
|
1752
|
+
"aliases": json["aliases"] == null ? void 0 : json["aliases"],
|
|
1753
|
+
"description": json["description"] == null ? void 0 : json["description"],
|
|
1754
|
+
"subtype": json["subtype"] == null ? void 0 : EntityClassNameFromJSON(json["subtype"])
|
|
1755
|
+
};
|
|
1756
|
+
}
|
|
1757
|
+
function GraphNodeToJSON(json) {
|
|
1758
|
+
return GraphNodeToJSONTyped(json, false);
|
|
1759
|
+
}
|
|
1760
|
+
function GraphNodeToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1761
|
+
if (value == null) {
|
|
1762
|
+
return value;
|
|
1763
|
+
}
|
|
1764
|
+
return {
|
|
1765
|
+
"id": value["id"],
|
|
1766
|
+
"type": GraphNodeTypeToJSON(value["type"]),
|
|
1767
|
+
"name": value["name"],
|
|
1768
|
+
"aliases": value["aliases"],
|
|
1769
|
+
"description": value["description"],
|
|
1770
|
+
"subtype": EntityClassNameToJSON(value["subtype"])
|
|
1771
|
+
};
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
// src/generated/models/RelationGroup.ts
|
|
1775
|
+
function instanceOfRelationGroup(value) {
|
|
1776
|
+
if (!("items" in value) || value["items"] === void 0) return false;
|
|
1777
|
+
if (!("total" in value) || value["total"] === void 0) return false;
|
|
1778
|
+
return true;
|
|
1779
|
+
}
|
|
1780
|
+
function RelationGroupFromJSON(json) {
|
|
1781
|
+
return RelationGroupFromJSONTyped(json, false);
|
|
1782
|
+
}
|
|
1783
|
+
function RelationGroupFromJSONTyped(json, ignoreDiscriminator) {
|
|
1784
|
+
if (json == null) {
|
|
1785
|
+
return json;
|
|
1786
|
+
}
|
|
1787
|
+
return {
|
|
1788
|
+
"items": json["items"].map(GraphNodeFromJSON),
|
|
1789
|
+
"total": json["total"]
|
|
1790
|
+
};
|
|
1791
|
+
}
|
|
1792
|
+
function RelationGroupToJSON(json) {
|
|
1793
|
+
return RelationGroupToJSONTyped(json, false);
|
|
1794
|
+
}
|
|
1795
|
+
function RelationGroupToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1796
|
+
if (value == null) {
|
|
1797
|
+
return value;
|
|
1798
|
+
}
|
|
1799
|
+
return {
|
|
1800
|
+
"items": value["items"].map(GraphNodeToJSON),
|
|
1801
|
+
"total": value["total"]
|
|
1802
|
+
};
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
// src/generated/models/RelatedGroups.ts
|
|
1806
|
+
function instanceOfRelatedGroups(value) {
|
|
1807
|
+
if (!("sources" in value) || value["sources"] === void 0) return false;
|
|
1808
|
+
if (!("metrics" in value) || value["metrics"] === void 0) return false;
|
|
1809
|
+
if (!("entities" in value) || value["entities"] === void 0) return false;
|
|
1810
|
+
return true;
|
|
1811
|
+
}
|
|
1812
|
+
function RelatedGroupsFromJSON(json) {
|
|
1813
|
+
return RelatedGroupsFromJSONTyped(json, false);
|
|
1814
|
+
}
|
|
1815
|
+
function RelatedGroupsFromJSONTyped(json, ignoreDiscriminator) {
|
|
1816
|
+
if (json == null) {
|
|
1817
|
+
return json;
|
|
1818
|
+
}
|
|
1819
|
+
return {
|
|
1820
|
+
"sources": RelationGroupFromJSON(json["sources"]),
|
|
1821
|
+
"metrics": RelationGroupFromJSON(json["metrics"]),
|
|
1822
|
+
"entities": RelationGroupFromJSON(json["entities"])
|
|
1823
|
+
};
|
|
1824
|
+
}
|
|
1825
|
+
function RelatedGroupsToJSON(json) {
|
|
1826
|
+
return RelatedGroupsToJSONTyped(json, false);
|
|
1827
|
+
}
|
|
1828
|
+
function RelatedGroupsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1829
|
+
if (value == null) {
|
|
1830
|
+
return value;
|
|
1831
|
+
}
|
|
1832
|
+
return {
|
|
1833
|
+
"sources": RelationGroupToJSON(value["sources"]),
|
|
1834
|
+
"metrics": RelationGroupToJSON(value["metrics"]),
|
|
1835
|
+
"entities": RelationGroupToJSON(value["entities"])
|
|
1836
|
+
};
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
// src/generated/models/GraphRelationPage.ts
|
|
1840
|
+
function instanceOfGraphRelationPage(value) {
|
|
1841
|
+
if (!("relation_type" in value) || value["relation_type"] === void 0) return false;
|
|
1842
|
+
if (!("items" in value) || value["items"] === void 0) return false;
|
|
1843
|
+
if (!("total" in value) || value["total"] === void 0) return false;
|
|
1844
|
+
return true;
|
|
1845
|
+
}
|
|
1846
|
+
function GraphRelationPageFromJSON(json) {
|
|
1847
|
+
return GraphRelationPageFromJSONTyped(json, false);
|
|
1848
|
+
}
|
|
1849
|
+
function GraphRelationPageFromJSONTyped(json, ignoreDiscriminator) {
|
|
1850
|
+
if (json == null) {
|
|
1851
|
+
return json;
|
|
1852
|
+
}
|
|
1853
|
+
return {
|
|
1854
|
+
"relation_type": GraphNodeTypeFromJSON(json["relation_type"]),
|
|
1855
|
+
"items": json["items"].map(GraphNodeFromJSON),
|
|
1856
|
+
"total": json["total"],
|
|
1857
|
+
"next_cursor": json["next_cursor"] == null ? void 0 : json["next_cursor"]
|
|
1858
|
+
};
|
|
1859
|
+
}
|
|
1860
|
+
function GraphRelationPageToJSON(json) {
|
|
1861
|
+
return GraphRelationPageToJSONTyped(json, false);
|
|
1862
|
+
}
|
|
1863
|
+
function GraphRelationPageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1864
|
+
if (value == null) {
|
|
1865
|
+
return value;
|
|
1866
|
+
}
|
|
1867
|
+
return {
|
|
1868
|
+
"relation_type": GraphNodeTypeToJSON(value["relation_type"]),
|
|
1869
|
+
"items": value["items"].map(GraphNodeToJSON),
|
|
1870
|
+
"total": value["total"],
|
|
1871
|
+
"next_cursor": value["next_cursor"]
|
|
1872
|
+
};
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
// src/generated/models/GraphRelatedResponse.ts
|
|
1876
|
+
function instanceOfGraphRelatedResponse(value) {
|
|
1877
|
+
if (!("node" in value) || value["node"] === void 0) return false;
|
|
1878
|
+
return true;
|
|
1879
|
+
}
|
|
1880
|
+
function GraphRelatedResponseFromJSON(json) {
|
|
1881
|
+
return GraphRelatedResponseFromJSONTyped(json, false);
|
|
1882
|
+
}
|
|
1883
|
+
function GraphRelatedResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1884
|
+
if (json == null) {
|
|
1885
|
+
return json;
|
|
1886
|
+
}
|
|
1887
|
+
return {
|
|
1888
|
+
"node": GraphNodeFromJSON(json["node"]),
|
|
1889
|
+
"related": json["related"] == null ? void 0 : RelatedGroupsFromJSON(json["related"]),
|
|
1890
|
+
"relation": json["relation"] == null ? void 0 : GraphRelationPageFromJSON(json["relation"])
|
|
1891
|
+
};
|
|
1892
|
+
}
|
|
1893
|
+
function GraphRelatedResponseToJSON(json) {
|
|
1894
|
+
return GraphRelatedResponseToJSONTyped(json, false);
|
|
1895
|
+
}
|
|
1896
|
+
function GraphRelatedResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1897
|
+
if (value == null) {
|
|
1898
|
+
return value;
|
|
1899
|
+
}
|
|
1900
|
+
return {
|
|
1901
|
+
"node": GraphNodeToJSON(value["node"]),
|
|
1902
|
+
"related": RelatedGroupsToJSON(value["related"]),
|
|
1903
|
+
"relation": GraphRelationPageToJSON(value["relation"])
|
|
1904
|
+
};
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
// src/generated/models/GraphSearchResponse.ts
|
|
1908
|
+
function instanceOfGraphSearchResponse(value) {
|
|
1909
|
+
if (!("results" in value) || value["results"] === void 0) return false;
|
|
1910
|
+
return true;
|
|
1911
|
+
}
|
|
1912
|
+
function GraphSearchResponseFromJSON(json) {
|
|
1913
|
+
return GraphSearchResponseFromJSONTyped(json, false);
|
|
1914
|
+
}
|
|
1915
|
+
function GraphSearchResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1916
|
+
if (json == null) {
|
|
1917
|
+
return json;
|
|
1918
|
+
}
|
|
1919
|
+
return {
|
|
1920
|
+
"results": json["results"].map(GraphNodeFromJSON)
|
|
1921
|
+
};
|
|
1922
|
+
}
|
|
1923
|
+
function GraphSearchResponseToJSON(json) {
|
|
1924
|
+
return GraphSearchResponseToJSONTyped(json, false);
|
|
1925
|
+
}
|
|
1926
|
+
function GraphSearchResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1927
|
+
if (value == null) {
|
|
1928
|
+
return value;
|
|
1929
|
+
}
|
|
1930
|
+
return {
|
|
1931
|
+
"results": value["results"].map(GraphNodeToJSON)
|
|
1932
|
+
};
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1661
1935
|
// src/generated/models/SearchEffortLevel.ts
|
|
1662
1936
|
var SearchEffortLevel = {
|
|
1663
1937
|
Fast: "fast",
|
|
@@ -1716,37 +1990,6 @@ function OutputSettingsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1716
1990
|
};
|
|
1717
1991
|
}
|
|
1718
1992
|
|
|
1719
|
-
// src/generated/models/TakoSourceSettings.ts
|
|
1720
|
-
function instanceOfTakoSourceSettings(value) {
|
|
1721
|
-
return true;
|
|
1722
|
-
}
|
|
1723
|
-
function TakoSourceSettingsFromJSON(json) {
|
|
1724
|
-
return TakoSourceSettingsFromJSONTyped(json, false);
|
|
1725
|
-
}
|
|
1726
|
-
function TakoSourceSettingsFromJSONTyped(json, ignoreDiscriminator) {
|
|
1727
|
-
if (json == null) {
|
|
1728
|
-
return json;
|
|
1729
|
-
}
|
|
1730
|
-
return {
|
|
1731
|
-
"count": json["count"] == null ? void 0 : json["count"],
|
|
1732
|
-
"include_contents": json["include_contents"] == null ? void 0 : json["include_contents"],
|
|
1733
|
-
"defer_data_retrieval": json["defer_data_retrieval"] == null ? void 0 : json["defer_data_retrieval"]
|
|
1734
|
-
};
|
|
1735
|
-
}
|
|
1736
|
-
function TakoSourceSettingsToJSON(json) {
|
|
1737
|
-
return TakoSourceSettingsToJSONTyped(json, false);
|
|
1738
|
-
}
|
|
1739
|
-
function TakoSourceSettingsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1740
|
-
if (value == null) {
|
|
1741
|
-
return value;
|
|
1742
|
-
}
|
|
1743
|
-
return {
|
|
1744
|
-
"count": value["count"],
|
|
1745
|
-
"include_contents": value["include_contents"],
|
|
1746
|
-
"defer_data_retrieval": value["defer_data_retrieval"]
|
|
1747
|
-
};
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
1993
|
// src/generated/models/SourceSettings.ts
|
|
1751
1994
|
function instanceOfSourceSettings(value) {
|
|
1752
1995
|
return true;
|
|
@@ -1788,7 +2031,7 @@ function SourcesFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
1788
2031
|
return json;
|
|
1789
2032
|
}
|
|
1790
2033
|
return {
|
|
1791
|
-
"data": json["data"] == null ? void 0 :
|
|
2034
|
+
"data": json["data"] == null ? void 0 : SourceSettingsFromJSON(json["data"]),
|
|
1792
2035
|
"web": json["web"] == null ? void 0 : SourceSettingsFromJSON(json["web"])
|
|
1793
2036
|
};
|
|
1794
2037
|
}
|
|
@@ -1800,7 +2043,7 @@ function SourcesToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1800
2043
|
return value;
|
|
1801
2044
|
}
|
|
1802
2045
|
return {
|
|
1803
|
-
"data":
|
|
2046
|
+
"data": SourceSettingsToJSON(value["data"]),
|
|
1804
2047
|
"web": SourceSettingsToJSON(value["web"])
|
|
1805
2048
|
};
|
|
1806
2049
|
}
|
|
@@ -1964,42 +2207,6 @@ var TakoApi = class extends BaseAPI {
|
|
|
1964
2207
|
const response = await this.answerRaw(requestParameters, initOverrides);
|
|
1965
2208
|
return await response.value();
|
|
1966
2209
|
}
|
|
1967
|
-
/**
|
|
1968
|
-
* Creates request options for classify without sending the request
|
|
1969
|
-
*/
|
|
1970
|
-
async classifyRequestOpts(requestParameters) {
|
|
1971
|
-
const queryParameters = {};
|
|
1972
|
-
const headerParameters = {};
|
|
1973
|
-
headerParameters["Content-Type"] = "application/json";
|
|
1974
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
1975
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
|
|
1976
|
-
}
|
|
1977
|
-
let urlPath = `/v1/classify`;
|
|
1978
|
-
return {
|
|
1979
|
-
path: urlPath,
|
|
1980
|
-
method: "POST",
|
|
1981
|
-
headers: headerParameters,
|
|
1982
|
-
query: queryParameters,
|
|
1983
|
-
body: ClassifyRequestToJSON(requestParameters["classifyRequest"])
|
|
1984
|
-
};
|
|
1985
|
-
}
|
|
1986
|
-
/**
|
|
1987
|
-
* 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.
|
|
1988
|
-
* Classify queries
|
|
1989
|
-
*/
|
|
1990
|
-
async classifyRaw(requestParameters, initOverrides) {
|
|
1991
|
-
const requestOptions = await this.classifyRequestOpts(requestParameters);
|
|
1992
|
-
const response = await this.request(requestOptions, initOverrides);
|
|
1993
|
-
return new JSONApiResponse(response, (jsonValue) => ClassifyResponseFromJSON(jsonValue));
|
|
1994
|
-
}
|
|
1995
|
-
/**
|
|
1996
|
-
* 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.
|
|
1997
|
-
* Classify queries
|
|
1998
|
-
*/
|
|
1999
|
-
async classify(requestParameters = {}, initOverrides) {
|
|
2000
|
-
const response = await this.classifyRaw(requestParameters, initOverrides);
|
|
2001
|
-
return await response.value();
|
|
2002
|
-
}
|
|
2003
2210
|
/**
|
|
2004
2211
|
* Creates request options for contents without sending the request
|
|
2005
2212
|
*/
|
|
@@ -2070,6 +2277,107 @@ var TakoApi = class extends BaseAPI {
|
|
|
2070
2277
|
const response = await this.createCardRaw(requestParameters, initOverrides);
|
|
2071
2278
|
return await response.value();
|
|
2072
2279
|
}
|
|
2280
|
+
/**
|
|
2281
|
+
* Creates request options for graphRelated without sending the request
|
|
2282
|
+
*/
|
|
2283
|
+
async graphRelatedRequestOpts(requestParameters) {
|
|
2284
|
+
if (requestParameters["nodeId"] == null) {
|
|
2285
|
+
throw new RequiredError(
|
|
2286
|
+
"nodeId",
|
|
2287
|
+
'Required parameter "nodeId" was null or undefined when calling graphRelated().'
|
|
2288
|
+
);
|
|
2289
|
+
}
|
|
2290
|
+
const queryParameters = {};
|
|
2291
|
+
if (requestParameters["nodeId"] != null) {
|
|
2292
|
+
queryParameters["node_id"] = requestParameters["nodeId"];
|
|
2293
|
+
}
|
|
2294
|
+
if (requestParameters["relationType"] != null) {
|
|
2295
|
+
queryParameters["relation_type"] = requestParameters["relationType"];
|
|
2296
|
+
}
|
|
2297
|
+
if (requestParameters["q"] != null) {
|
|
2298
|
+
queryParameters["q"] = requestParameters["q"];
|
|
2299
|
+
}
|
|
2300
|
+
if (requestParameters["cursor"] != null) {
|
|
2301
|
+
queryParameters["cursor"] = requestParameters["cursor"];
|
|
2302
|
+
}
|
|
2303
|
+
if (requestParameters["limit"] != null) {
|
|
2304
|
+
queryParameters["limit"] = requestParameters["limit"];
|
|
2305
|
+
}
|
|
2306
|
+
const headerParameters = {};
|
|
2307
|
+
let urlPath = `/beta/graph/related`;
|
|
2308
|
+
return {
|
|
2309
|
+
path: urlPath,
|
|
2310
|
+
method: "GET",
|
|
2311
|
+
headers: headerParameters,
|
|
2312
|
+
query: queryParameters
|
|
2313
|
+
};
|
|
2314
|
+
}
|
|
2315
|
+
/**
|
|
2316
|
+
* 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.
|
|
2317
|
+
* Get a graph node\'s related nodes
|
|
2318
|
+
*/
|
|
2319
|
+
async graphRelatedRaw(requestParameters, initOverrides) {
|
|
2320
|
+
const requestOptions = await this.graphRelatedRequestOpts(requestParameters);
|
|
2321
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
2322
|
+
return new JSONApiResponse(response, (jsonValue) => GraphRelatedResponseFromJSON(jsonValue));
|
|
2323
|
+
}
|
|
2324
|
+
/**
|
|
2325
|
+
* 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.
|
|
2326
|
+
* Get a graph node\'s related nodes
|
|
2327
|
+
*/
|
|
2328
|
+
async graphRelated(requestParameters, initOverrides) {
|
|
2329
|
+
const response = await this.graphRelatedRaw(requestParameters, initOverrides);
|
|
2330
|
+
return await response.value();
|
|
2331
|
+
}
|
|
2332
|
+
/**
|
|
2333
|
+
* Creates request options for graphSearch without sending the request
|
|
2334
|
+
*/
|
|
2335
|
+
async graphSearchRequestOpts(requestParameters) {
|
|
2336
|
+
if (requestParameters["q"] == null) {
|
|
2337
|
+
throw new RequiredError(
|
|
2338
|
+
"q",
|
|
2339
|
+
'Required parameter "q" was null or undefined when calling graphSearch().'
|
|
2340
|
+
);
|
|
2341
|
+
}
|
|
2342
|
+
const queryParameters = {};
|
|
2343
|
+
if (requestParameters["q"] != null) {
|
|
2344
|
+
queryParameters["q"] = requestParameters["q"];
|
|
2345
|
+
}
|
|
2346
|
+
if (requestParameters["types"] != null) {
|
|
2347
|
+
queryParameters["types"] = requestParameters["types"];
|
|
2348
|
+
}
|
|
2349
|
+
if (requestParameters["limit"] != null) {
|
|
2350
|
+
queryParameters["limit"] = requestParameters["limit"];
|
|
2351
|
+
}
|
|
2352
|
+
if (requestParameters["subtype"] != null) {
|
|
2353
|
+
queryParameters["subtype"] = requestParameters["subtype"];
|
|
2354
|
+
}
|
|
2355
|
+
const headerParameters = {};
|
|
2356
|
+
let urlPath = `/beta/graph/search`;
|
|
2357
|
+
return {
|
|
2358
|
+
path: urlPath,
|
|
2359
|
+
method: "GET",
|
|
2360
|
+
headers: headerParameters,
|
|
2361
|
+
query: queryParameters
|
|
2362
|
+
};
|
|
2363
|
+
}
|
|
2364
|
+
/**
|
|
2365
|
+
* 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).
|
|
2366
|
+
* Search the data graph
|
|
2367
|
+
*/
|
|
2368
|
+
async graphSearchRaw(requestParameters, initOverrides) {
|
|
2369
|
+
const requestOptions = await this.graphSearchRequestOpts(requestParameters);
|
|
2370
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
2371
|
+
return new JSONApiResponse(response, (jsonValue) => GraphSearchResponseFromJSON(jsonValue));
|
|
2372
|
+
}
|
|
2373
|
+
/**
|
|
2374
|
+
* 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).
|
|
2375
|
+
* Search the data graph
|
|
2376
|
+
*/
|
|
2377
|
+
async graphSearch(requestParameters, initOverrides) {
|
|
2378
|
+
const response = await this.graphSearchRaw(requestParameters, initOverrides);
|
|
2379
|
+
return await response.value();
|
|
2380
|
+
}
|
|
2073
2381
|
/**
|
|
2074
2382
|
* Creates request options for search without sending the request
|
|
2075
2383
|
*/
|
|
@@ -2107,6 +2415,92 @@ var TakoApi = class extends BaseAPI {
|
|
|
2107
2415
|
return await response.value();
|
|
2108
2416
|
}
|
|
2109
2417
|
};
|
|
2418
|
+
var GraphSearchSubtypeEnum = {
|
|
2419
|
+
Companies: "Companies",
|
|
2420
|
+
Cryptocurrencies: "Cryptocurrencies",
|
|
2421
|
+
FinancialInstruments: "Financial Instruments",
|
|
2422
|
+
InternetBrowsers: "Internet Browsers",
|
|
2423
|
+
Commodities: "Commodities",
|
|
2424
|
+
People: "People",
|
|
2425
|
+
Currencies: "Currencies",
|
|
2426
|
+
StockExchanges: "Stock Exchanges",
|
|
2427
|
+
Securities: "Securities",
|
|
2428
|
+
Ipos: "IPOs",
|
|
2429
|
+
GovernmentDebtInstruments: "Government Debt Instruments",
|
|
2430
|
+
TreasurySecurities: "Treasury Securities",
|
|
2431
|
+
Airports: "Airports",
|
|
2432
|
+
Airlines: "Airlines",
|
|
2433
|
+
VehicleTypes: "Vehicle Types",
|
|
2434
|
+
TransportationModes: "Transportation Modes",
|
|
2435
|
+
Drugs: "Drugs",
|
|
2436
|
+
DrugCategories: "Drug Categories",
|
|
2437
|
+
Diseases: "Diseases",
|
|
2438
|
+
ChemicalElements: "Chemical Elements",
|
|
2439
|
+
ChemicalCompounds: "Chemical Compounds",
|
|
2440
|
+
CelestialBodies: "Celestial Bodies",
|
|
2441
|
+
Occupations: "Occupations",
|
|
2442
|
+
SocialMediaPlatforms: "Social Media Platforms",
|
|
2443
|
+
OperatingSystems: "Operating Systems",
|
|
2444
|
+
SearchEngines: "Search Engines",
|
|
2445
|
+
DeviceTypes: "Device Types",
|
|
2446
|
+
Llms: "LLMs",
|
|
2447
|
+
LlmFamilies: "LLM Families",
|
|
2448
|
+
LlmBenchmarks: "LLM Benchmarks",
|
|
2449
|
+
Industries: "Industries",
|
|
2450
|
+
NaicsIndustries: "NAICS Industries",
|
|
2451
|
+
BlsIndustries: "BLS Industries",
|
|
2452
|
+
PscCategories: "PSC Categories",
|
|
2453
|
+
FederalContractors: "Federal Contractors",
|
|
2454
|
+
FederalAgencies: "Federal Agencies",
|
|
2455
|
+
FederalSubagencies: "Federal Subagencies",
|
|
2456
|
+
IceContracts: "ICE Contracts",
|
|
2457
|
+
IceContractors: "ICE Contractors",
|
|
2458
|
+
Elections: "Elections",
|
|
2459
|
+
PoliticalOffices: "Political Offices",
|
|
2460
|
+
Pollsters: "Pollsters",
|
|
2461
|
+
AgriculturalProducts: "Agricultural Products",
|
|
2462
|
+
TobaccoProducts: "Tobacco Products",
|
|
2463
|
+
PredictionMarkets: "Prediction Markets",
|
|
2464
|
+
PredictionEvents: "Prediction Events",
|
|
2465
|
+
RealEstatePropertyTypes: "Real Estate Property Types",
|
|
2466
|
+
Continents: "Continents",
|
|
2467
|
+
WorldRegions: "World Regions",
|
|
2468
|
+
Countries: "Countries",
|
|
2469
|
+
States: "States",
|
|
2470
|
+
Counties: "Counties",
|
|
2471
|
+
MetroAreas: "Metro Areas",
|
|
2472
|
+
Cities: "Cities",
|
|
2473
|
+
F1Drivers: "F1 Drivers",
|
|
2474
|
+
F1Teams: "F1 Teams",
|
|
2475
|
+
F1Circuits: "F1 Circuits",
|
|
2476
|
+
F1Events: "F1 Events",
|
|
2477
|
+
NascarDrivers: "NASCAR Drivers",
|
|
2478
|
+
NascarTeams: "NASCAR Teams",
|
|
2479
|
+
NascarTracks: "NASCAR Tracks",
|
|
2480
|
+
NascarEvents: "NASCAR Events",
|
|
2481
|
+
NascarRaces: "NASCAR Races",
|
|
2482
|
+
NascarOwners: "NASCAR Owners",
|
|
2483
|
+
NascarManufacturers: "NASCAR Manufacturers",
|
|
2484
|
+
SoccerTeams: "Soccer Teams",
|
|
2485
|
+
SoccerPlayers: "Soccer Players",
|
|
2486
|
+
SoccerCompetitions: "Soccer Competitions",
|
|
2487
|
+
SoccerConferences: "Soccer Conferences",
|
|
2488
|
+
BasketballTeams: "Basketball Teams",
|
|
2489
|
+
BasketballPlayers: "Basketball Players",
|
|
2490
|
+
BasketballConferences: "Basketball Conferences",
|
|
2491
|
+
BasketballDivisions: "Basketball Divisions",
|
|
2492
|
+
BaseballTeams: "Baseball Teams",
|
|
2493
|
+
BaseballPlayers: "Baseball Players",
|
|
2494
|
+
BaseballConferences: "Baseball Conferences",
|
|
2495
|
+
BaseballDivisions: "Baseball Divisions",
|
|
2496
|
+
BaseballCompetitions: "Baseball Competitions",
|
|
2497
|
+
FootballTeams: "Football Teams",
|
|
2498
|
+
FootballPlayers: "Football Players",
|
|
2499
|
+
FootballConferences: "Football Conferences",
|
|
2500
|
+
FootballDivisions: "Football Divisions",
|
|
2501
|
+
Sports: "Sports",
|
|
2502
|
+
SportsLeagues: "Sports Leagues"
|
|
2503
|
+
};
|
|
2110
2504
|
|
|
2111
2505
|
// src/generated/models/APIErrorType.ts
|
|
2112
2506
|
var APIErrorType = {
|
|
@@ -3038,6 +3432,14 @@ var Tako = class {
|
|
|
3038
3432
|
createCard(request) {
|
|
3039
3433
|
return this.api.createCard({ createCardRequest: request });
|
|
3040
3434
|
}
|
|
3435
|
+
// /beta/graph/search and /beta/graph/related are GET endpoints, so the
|
|
3436
|
+
// generated request type is the query-param object itself (no body wrapper).
|
|
3437
|
+
graphSearch(request) {
|
|
3438
|
+
return this.api.graphSearch(request);
|
|
3439
|
+
}
|
|
3440
|
+
graphRelated(request) {
|
|
3441
|
+
return this.api.graphRelated(request);
|
|
3442
|
+
}
|
|
3041
3443
|
};
|
|
3042
3444
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3043
3445
|
0 && (module.exports = {
|
|
@@ -3106,14 +3508,6 @@ var Tako = class {
|
|
|
3106
3508
|
BlockToJSON,
|
|
3107
3509
|
BlockToJSONTyped,
|
|
3108
3510
|
COLLECTION_FORMATS,
|
|
3109
|
-
ClassifyRequestFromJSON,
|
|
3110
|
-
ClassifyRequestFromJSONTyped,
|
|
3111
|
-
ClassifyRequestToJSON,
|
|
3112
|
-
ClassifyRequestToJSONTyped,
|
|
3113
|
-
ClassifyResponseFromJSON,
|
|
3114
|
-
ClassifyResponseFromJSONTyped,
|
|
3115
|
-
ClassifyResponseToJSON,
|
|
3116
|
-
ClassifyResponseToJSONTyped,
|
|
3117
3511
|
ComponentConfigFromJSON,
|
|
3118
3512
|
ComponentConfigFromJSONTyped,
|
|
3119
3513
|
ComponentConfigToJSON,
|
|
@@ -3160,11 +3554,38 @@ var Tako = class {
|
|
|
3160
3554
|
DataPipelineAnswerEventToJSON,
|
|
3161
3555
|
DataPipelineAnswerEventToJSONTyped,
|
|
3162
3556
|
DefaultConfig,
|
|
3557
|
+
EntityClassName,
|
|
3558
|
+
EntityClassNameFromJSON,
|
|
3559
|
+
EntityClassNameFromJSONTyped,
|
|
3560
|
+
EntityClassNameToJSON,
|
|
3561
|
+
EntityClassNameToJSONTyped,
|
|
3163
3562
|
ErrorObjectFromJSON,
|
|
3164
3563
|
ErrorObjectFromJSONTyped,
|
|
3165
3564
|
ErrorObjectToJSON,
|
|
3166
3565
|
ErrorObjectToJSONTyped,
|
|
3167
3566
|
FetchError,
|
|
3567
|
+
GraphNodeFromJSON,
|
|
3568
|
+
GraphNodeFromJSONTyped,
|
|
3569
|
+
GraphNodeToJSON,
|
|
3570
|
+
GraphNodeToJSONTyped,
|
|
3571
|
+
GraphNodeType,
|
|
3572
|
+
GraphNodeTypeFromJSON,
|
|
3573
|
+
GraphNodeTypeFromJSONTyped,
|
|
3574
|
+
GraphNodeTypeToJSON,
|
|
3575
|
+
GraphNodeTypeToJSONTyped,
|
|
3576
|
+
GraphRelatedResponseFromJSON,
|
|
3577
|
+
GraphRelatedResponseFromJSONTyped,
|
|
3578
|
+
GraphRelatedResponseToJSON,
|
|
3579
|
+
GraphRelatedResponseToJSONTyped,
|
|
3580
|
+
GraphRelationPageFromJSON,
|
|
3581
|
+
GraphRelationPageFromJSONTyped,
|
|
3582
|
+
GraphRelationPageToJSON,
|
|
3583
|
+
GraphRelationPageToJSONTyped,
|
|
3584
|
+
GraphSearchResponseFromJSON,
|
|
3585
|
+
GraphSearchResponseFromJSONTyped,
|
|
3586
|
+
GraphSearchResponseToJSON,
|
|
3587
|
+
GraphSearchResponseToJSONTyped,
|
|
3588
|
+
GraphSearchSubtypeEnum,
|
|
3168
3589
|
HeartbeatEventFromJSON,
|
|
3169
3590
|
HeartbeatEventFromJSONTyped,
|
|
3170
3591
|
HeartbeatEventKindEnum,
|
|
@@ -3184,15 +3605,19 @@ var Tako = class {
|
|
|
3184
3605
|
OutputSettingsFromJSONTyped,
|
|
3185
3606
|
OutputSettingsToJSON,
|
|
3186
3607
|
OutputSettingsToJSONTyped,
|
|
3187
|
-
QueryClassificationFromJSON,
|
|
3188
|
-
QueryClassificationFromJSONTyped,
|
|
3189
|
-
QueryClassificationToJSON,
|
|
3190
|
-
QueryClassificationToJSONTyped,
|
|
3191
3608
|
ReasoningEventFromJSON,
|
|
3192
3609
|
ReasoningEventFromJSONTyped,
|
|
3193
3610
|
ReasoningEventKindEnum,
|
|
3194
3611
|
ReasoningEventToJSON,
|
|
3195
3612
|
ReasoningEventToJSONTyped,
|
|
3613
|
+
RelatedGroupsFromJSON,
|
|
3614
|
+
RelatedGroupsFromJSONTyped,
|
|
3615
|
+
RelatedGroupsToJSON,
|
|
3616
|
+
RelatedGroupsToJSONTyped,
|
|
3617
|
+
RelationGroupFromJSON,
|
|
3618
|
+
RelationGroupFromJSONTyped,
|
|
3619
|
+
RelationGroupToJSON,
|
|
3620
|
+
RelationGroupToJSONTyped,
|
|
3196
3621
|
RequiredError,
|
|
3197
3622
|
ResponseError,
|
|
3198
3623
|
ResultContentFromJSON,
|
|
@@ -3261,10 +3686,6 @@ var Tako = class {
|
|
|
3261
3686
|
TakoSourceIndexFromJSONTyped,
|
|
3262
3687
|
TakoSourceIndexToJSON,
|
|
3263
3688
|
TakoSourceIndexToJSONTyped,
|
|
3264
|
-
TakoSourceSettingsFromJSON,
|
|
3265
|
-
TakoSourceSettingsFromJSONTyped,
|
|
3266
|
-
TakoSourceSettingsToJSON,
|
|
3267
|
-
TakoSourceSettingsToJSONTyped,
|
|
3268
3689
|
TextApiResponse,
|
|
3269
3690
|
TextEventFromJSON,
|
|
3270
3691
|
TextEventFromJSONTyped,
|
|
@@ -3315,8 +3736,6 @@ var Tako = class {
|
|
|
3315
3736
|
instanceOfAgentUsage,
|
|
3316
3737
|
instanceOfAnswerResponse,
|
|
3317
3738
|
instanceOfBaseAPIError,
|
|
3318
|
-
instanceOfClassifyRequest,
|
|
3319
|
-
instanceOfClassifyResponse,
|
|
3320
3739
|
instanceOfComponentConfig,
|
|
3321
3740
|
instanceOfComponentTypeEnum,
|
|
3322
3741
|
instanceOfContentFormat,
|
|
@@ -3327,13 +3746,20 @@ var Tako = class {
|
|
|
3327
3746
|
instanceOfCreateCard400Response,
|
|
3328
3747
|
instanceOfCreateCardRequest,
|
|
3329
3748
|
instanceOfDataPipelineAnswerEvent,
|
|
3749
|
+
instanceOfEntityClassName,
|
|
3330
3750
|
instanceOfErrorObject,
|
|
3751
|
+
instanceOfGraphNode,
|
|
3752
|
+
instanceOfGraphNodeType,
|
|
3753
|
+
instanceOfGraphRelatedResponse,
|
|
3754
|
+
instanceOfGraphRelationPage,
|
|
3755
|
+
instanceOfGraphSearchResponse,
|
|
3331
3756
|
instanceOfHeartbeatEvent,
|
|
3332
3757
|
instanceOfKnowledgeCardMethodology,
|
|
3333
3758
|
instanceOfKnowledgeCardRelevance,
|
|
3334
3759
|
instanceOfOutputSettings,
|
|
3335
|
-
instanceOfQueryClassification,
|
|
3336
3760
|
instanceOfReasoningEvent,
|
|
3761
|
+
instanceOfRelatedGroups,
|
|
3762
|
+
instanceOfRelationGroup,
|
|
3337
3763
|
instanceOfResultContent,
|
|
3338
3764
|
instanceOfSearchEffortLevel,
|
|
3339
3765
|
instanceOfSearchRequest,
|
|
@@ -3348,7 +3774,6 @@ var Tako = class {
|
|
|
3348
3774
|
instanceOfTakoCard,
|
|
3349
3775
|
instanceOfTakoCardSource,
|
|
3350
3776
|
instanceOfTakoSourceIndex,
|
|
3351
|
-
instanceOfTakoSourceSettings,
|
|
3352
3777
|
instanceOfTextEvent,
|
|
3353
3778
|
instanceOfThinVizCard,
|
|
3354
3779
|
instanceOfToolCallEvent,
|