@aws-sdk/client-bedrock-agent 3.525.0 → 3.529.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +38 -79
- package/dist-es/protocols/Aws_restJson1.js +1 -41
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -1223,7 +1223,7 @@ var de_AssociateAgentKnowledgeBaseCommand = /* @__PURE__ */ __name(async (output
|
|
|
1223
1223
|
const contents = (0, import_smithy_client.map)({
|
|
1224
1224
|
$metadata: deserializeMetadata(output)
|
|
1225
1225
|
});
|
|
1226
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1226
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1227
1227
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1228
1228
|
agentKnowledgeBase: (_) => de_AgentKnowledgeBase(_, context)
|
|
1229
1229
|
});
|
|
@@ -1237,7 +1237,7 @@ var de_CreateAgentCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1237
1237
|
const contents = (0, import_smithy_client.map)({
|
|
1238
1238
|
$metadata: deserializeMetadata(output)
|
|
1239
1239
|
});
|
|
1240
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1240
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1241
1241
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1242
1242
|
agent: (_) => de_Agent(_, context)
|
|
1243
1243
|
});
|
|
@@ -1251,7 +1251,7 @@ var de_CreateAgentActionGroupCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
1251
1251
|
const contents = (0, import_smithy_client.map)({
|
|
1252
1252
|
$metadata: deserializeMetadata(output)
|
|
1253
1253
|
});
|
|
1254
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1254
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1255
1255
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1256
1256
|
agentActionGroup: (_) => de_AgentActionGroup(_, context)
|
|
1257
1257
|
});
|
|
@@ -1265,7 +1265,7 @@ var de_CreateAgentAliasCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1265
1265
|
const contents = (0, import_smithy_client.map)({
|
|
1266
1266
|
$metadata: deserializeMetadata(output)
|
|
1267
1267
|
});
|
|
1268
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1268
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1269
1269
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1270
1270
|
agentAlias: (_) => de_AgentAlias(_, context)
|
|
1271
1271
|
});
|
|
@@ -1279,7 +1279,7 @@ var de_CreateDataSourceCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1279
1279
|
const contents = (0, import_smithy_client.map)({
|
|
1280
1280
|
$metadata: deserializeMetadata(output)
|
|
1281
1281
|
});
|
|
1282
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1282
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1283
1283
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1284
1284
|
dataSource: (_) => de_DataSource(_, context)
|
|
1285
1285
|
});
|
|
@@ -1293,7 +1293,7 @@ var de_CreateKnowledgeBaseCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
1293
1293
|
const contents = (0, import_smithy_client.map)({
|
|
1294
1294
|
$metadata: deserializeMetadata(output)
|
|
1295
1295
|
});
|
|
1296
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1296
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1297
1297
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1298
1298
|
knowledgeBase: (_) => de_KnowledgeBase(_, context)
|
|
1299
1299
|
});
|
|
@@ -1307,7 +1307,7 @@ var de_DeleteAgentCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1307
1307
|
const contents = (0, import_smithy_client.map)({
|
|
1308
1308
|
$metadata: deserializeMetadata(output)
|
|
1309
1309
|
});
|
|
1310
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1310
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1311
1311
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1312
1312
|
agentId: import_smithy_client.expectString,
|
|
1313
1313
|
agentStatus: import_smithy_client.expectString
|
|
@@ -1332,7 +1332,7 @@ var de_DeleteAgentAliasCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1332
1332
|
const contents = (0, import_smithy_client.map)({
|
|
1333
1333
|
$metadata: deserializeMetadata(output)
|
|
1334
1334
|
});
|
|
1335
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1335
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1336
1336
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1337
1337
|
agentAliasId: import_smithy_client.expectString,
|
|
1338
1338
|
agentAliasStatus: import_smithy_client.expectString,
|
|
@@ -1348,7 +1348,7 @@ var de_DeleteAgentVersionCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
1348
1348
|
const contents = (0, import_smithy_client.map)({
|
|
1349
1349
|
$metadata: deserializeMetadata(output)
|
|
1350
1350
|
});
|
|
1351
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1351
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1352
1352
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1353
1353
|
agentId: import_smithy_client.expectString,
|
|
1354
1354
|
agentStatus: import_smithy_client.expectString,
|
|
@@ -1364,7 +1364,7 @@ var de_DeleteDataSourceCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1364
1364
|
const contents = (0, import_smithy_client.map)({
|
|
1365
1365
|
$metadata: deserializeMetadata(output)
|
|
1366
1366
|
});
|
|
1367
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1367
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1368
1368
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1369
1369
|
dataSourceId: import_smithy_client.expectString,
|
|
1370
1370
|
knowledgeBaseId: import_smithy_client.expectString,
|
|
@@ -1380,7 +1380,7 @@ var de_DeleteKnowledgeBaseCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
1380
1380
|
const contents = (0, import_smithy_client.map)({
|
|
1381
1381
|
$metadata: deserializeMetadata(output)
|
|
1382
1382
|
});
|
|
1383
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1383
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1384
1384
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1385
1385
|
knowledgeBaseId: import_smithy_client.expectString,
|
|
1386
1386
|
status: import_smithy_client.expectString
|
|
@@ -1405,7 +1405,7 @@ var de_GetAgentCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1405
1405
|
const contents = (0, import_smithy_client.map)({
|
|
1406
1406
|
$metadata: deserializeMetadata(output)
|
|
1407
1407
|
});
|
|
1408
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1408
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1409
1409
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1410
1410
|
agent: (_) => de_Agent(_, context)
|
|
1411
1411
|
});
|
|
@@ -1419,7 +1419,7 @@ var de_GetAgentActionGroupCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
1419
1419
|
const contents = (0, import_smithy_client.map)({
|
|
1420
1420
|
$metadata: deserializeMetadata(output)
|
|
1421
1421
|
});
|
|
1422
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1422
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1423
1423
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1424
1424
|
agentActionGroup: (_) => de_AgentActionGroup(_, context)
|
|
1425
1425
|
});
|
|
@@ -1433,7 +1433,7 @@ var de_GetAgentAliasCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1433
1433
|
const contents = (0, import_smithy_client.map)({
|
|
1434
1434
|
$metadata: deserializeMetadata(output)
|
|
1435
1435
|
});
|
|
1436
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1436
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1437
1437
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1438
1438
|
agentAlias: (_) => de_AgentAlias(_, context)
|
|
1439
1439
|
});
|
|
@@ -1447,7 +1447,7 @@ var de_GetAgentKnowledgeBaseCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
1447
1447
|
const contents = (0, import_smithy_client.map)({
|
|
1448
1448
|
$metadata: deserializeMetadata(output)
|
|
1449
1449
|
});
|
|
1450
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1450
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1451
1451
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1452
1452
|
agentKnowledgeBase: (_) => de_AgentKnowledgeBase(_, context)
|
|
1453
1453
|
});
|
|
@@ -1461,7 +1461,7 @@ var de_GetAgentVersionCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
1461
1461
|
const contents = (0, import_smithy_client.map)({
|
|
1462
1462
|
$metadata: deserializeMetadata(output)
|
|
1463
1463
|
});
|
|
1464
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1464
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1465
1465
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1466
1466
|
agentVersion: (_) => de_AgentVersion(_, context)
|
|
1467
1467
|
});
|
|
@@ -1475,7 +1475,7 @@ var de_GetDataSourceCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1475
1475
|
const contents = (0, import_smithy_client.map)({
|
|
1476
1476
|
$metadata: deserializeMetadata(output)
|
|
1477
1477
|
});
|
|
1478
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1478
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1479
1479
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1480
1480
|
dataSource: (_) => de_DataSource(_, context)
|
|
1481
1481
|
});
|
|
@@ -1489,7 +1489,7 @@ var de_GetIngestionJobCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
1489
1489
|
const contents = (0, import_smithy_client.map)({
|
|
1490
1490
|
$metadata: deserializeMetadata(output)
|
|
1491
1491
|
});
|
|
1492
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1492
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1493
1493
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1494
1494
|
ingestionJob: (_) => de_IngestionJob(_, context)
|
|
1495
1495
|
});
|
|
@@ -1503,7 +1503,7 @@ var de_GetKnowledgeBaseCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1503
1503
|
const contents = (0, import_smithy_client.map)({
|
|
1504
1504
|
$metadata: deserializeMetadata(output)
|
|
1505
1505
|
});
|
|
1506
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1506
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1507
1507
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1508
1508
|
knowledgeBase: (_) => de_KnowledgeBase(_, context)
|
|
1509
1509
|
});
|
|
@@ -1517,7 +1517,7 @@ var de_ListAgentActionGroupsCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
1517
1517
|
const contents = (0, import_smithy_client.map)({
|
|
1518
1518
|
$metadata: deserializeMetadata(output)
|
|
1519
1519
|
});
|
|
1520
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1520
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1521
1521
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1522
1522
|
actionGroupSummaries: (_) => de_ActionGroupSummaries(_, context),
|
|
1523
1523
|
nextToken: import_smithy_client.expectString
|
|
@@ -1532,7 +1532,7 @@ var de_ListAgentAliasesCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1532
1532
|
const contents = (0, import_smithy_client.map)({
|
|
1533
1533
|
$metadata: deserializeMetadata(output)
|
|
1534
1534
|
});
|
|
1535
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1535
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1536
1536
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1537
1537
|
agentAliasSummaries: (_) => de_AgentAliasSummaries(_, context),
|
|
1538
1538
|
nextToken: import_smithy_client.expectString
|
|
@@ -1547,7 +1547,7 @@ var de_ListAgentKnowledgeBasesCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
1547
1547
|
const contents = (0, import_smithy_client.map)({
|
|
1548
1548
|
$metadata: deserializeMetadata(output)
|
|
1549
1549
|
});
|
|
1550
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1550
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1551
1551
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1552
1552
|
agentKnowledgeBaseSummaries: (_) => de_AgentKnowledgeBaseSummaries(_, context),
|
|
1553
1553
|
nextToken: import_smithy_client.expectString
|
|
@@ -1562,7 +1562,7 @@ var de_ListAgentsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1562
1562
|
const contents = (0, import_smithy_client.map)({
|
|
1563
1563
|
$metadata: deserializeMetadata(output)
|
|
1564
1564
|
});
|
|
1565
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1565
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1566
1566
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1567
1567
|
agentSummaries: (_) => de_AgentSummaries(_, context),
|
|
1568
1568
|
nextToken: import_smithy_client.expectString
|
|
@@ -1577,7 +1577,7 @@ var de_ListAgentVersionsCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1577
1577
|
const contents = (0, import_smithy_client.map)({
|
|
1578
1578
|
$metadata: deserializeMetadata(output)
|
|
1579
1579
|
});
|
|
1580
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1580
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1581
1581
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1582
1582
|
agentVersionSummaries: (_) => de_AgentVersionSummaries(_, context),
|
|
1583
1583
|
nextToken: import_smithy_client.expectString
|
|
@@ -1592,7 +1592,7 @@ var de_ListDataSourcesCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
1592
1592
|
const contents = (0, import_smithy_client.map)({
|
|
1593
1593
|
$metadata: deserializeMetadata(output)
|
|
1594
1594
|
});
|
|
1595
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1595
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1596
1596
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1597
1597
|
dataSourceSummaries: (_) => de_DataSourceSummaries(_, context),
|
|
1598
1598
|
nextToken: import_smithy_client.expectString
|
|
@@ -1607,7 +1607,7 @@ var de_ListIngestionJobsCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1607
1607
|
const contents = (0, import_smithy_client.map)({
|
|
1608
1608
|
$metadata: deserializeMetadata(output)
|
|
1609
1609
|
});
|
|
1610
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1610
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1611
1611
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1612
1612
|
ingestionJobSummaries: (_) => de_IngestionJobSummaries(_, context),
|
|
1613
1613
|
nextToken: import_smithy_client.expectString
|
|
@@ -1622,7 +1622,7 @@ var de_ListKnowledgeBasesCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
1622
1622
|
const contents = (0, import_smithy_client.map)({
|
|
1623
1623
|
$metadata: deserializeMetadata(output)
|
|
1624
1624
|
});
|
|
1625
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1625
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1626
1626
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1627
1627
|
knowledgeBaseSummaries: (_) => de_KnowledgeBaseSummaries(_, context),
|
|
1628
1628
|
nextToken: import_smithy_client.expectString
|
|
@@ -1637,7 +1637,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
1637
1637
|
const contents = (0, import_smithy_client.map)({
|
|
1638
1638
|
$metadata: deserializeMetadata(output)
|
|
1639
1639
|
});
|
|
1640
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1640
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1641
1641
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1642
1642
|
tags: import_smithy_client._json
|
|
1643
1643
|
});
|
|
@@ -1651,7 +1651,7 @@ var de_PrepareAgentCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1651
1651
|
const contents = (0, import_smithy_client.map)({
|
|
1652
1652
|
$metadata: deserializeMetadata(output)
|
|
1653
1653
|
});
|
|
1654
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1654
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1655
1655
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1656
1656
|
agentId: import_smithy_client.expectString,
|
|
1657
1657
|
agentStatus: import_smithy_client.expectString,
|
|
@@ -1668,7 +1668,7 @@ var de_StartIngestionJobCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1668
1668
|
const contents = (0, import_smithy_client.map)({
|
|
1669
1669
|
$metadata: deserializeMetadata(output)
|
|
1670
1670
|
});
|
|
1671
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1671
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1672
1672
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1673
1673
|
ingestionJob: (_) => de_IngestionJob(_, context)
|
|
1674
1674
|
});
|
|
@@ -1702,7 +1702,7 @@ var de_UpdateAgentCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1702
1702
|
const contents = (0, import_smithy_client.map)({
|
|
1703
1703
|
$metadata: deserializeMetadata(output)
|
|
1704
1704
|
});
|
|
1705
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1705
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1706
1706
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1707
1707
|
agent: (_) => de_Agent(_, context)
|
|
1708
1708
|
});
|
|
@@ -1716,7 +1716,7 @@ var de_UpdateAgentActionGroupCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
1716
1716
|
const contents = (0, import_smithy_client.map)({
|
|
1717
1717
|
$metadata: deserializeMetadata(output)
|
|
1718
1718
|
});
|
|
1719
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1719
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1720
1720
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1721
1721
|
agentActionGroup: (_) => de_AgentActionGroup(_, context)
|
|
1722
1722
|
});
|
|
@@ -1730,7 +1730,7 @@ var de_UpdateAgentAliasCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1730
1730
|
const contents = (0, import_smithy_client.map)({
|
|
1731
1731
|
$metadata: deserializeMetadata(output)
|
|
1732
1732
|
});
|
|
1733
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1733
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1734
1734
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1735
1735
|
agentAlias: (_) => de_AgentAlias(_, context)
|
|
1736
1736
|
});
|
|
@@ -1744,7 +1744,7 @@ var de_UpdateAgentKnowledgeBaseCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
1744
1744
|
const contents = (0, import_smithy_client.map)({
|
|
1745
1745
|
$metadata: deserializeMetadata(output)
|
|
1746
1746
|
});
|
|
1747
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1747
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1748
1748
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1749
1749
|
agentKnowledgeBase: (_) => de_AgentKnowledgeBase(_, context)
|
|
1750
1750
|
});
|
|
@@ -1758,7 +1758,7 @@ var de_UpdateDataSourceCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1758
1758
|
const contents = (0, import_smithy_client.map)({
|
|
1759
1759
|
$metadata: deserializeMetadata(output)
|
|
1760
1760
|
});
|
|
1761
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1761
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1762
1762
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1763
1763
|
dataSource: (_) => de_DataSource(_, context)
|
|
1764
1764
|
});
|
|
@@ -1772,7 +1772,7 @@ var de_UpdateKnowledgeBaseCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
1772
1772
|
const contents = (0, import_smithy_client.map)({
|
|
1773
1773
|
$metadata: deserializeMetadata(output)
|
|
1774
1774
|
});
|
|
1775
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1775
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1776
1776
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1777
1777
|
knowledgeBase: (_) => de_KnowledgeBase(_, context)
|
|
1778
1778
|
});
|
|
@@ -1782,9 +1782,9 @@ var de_UpdateKnowledgeBaseCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
1782
1782
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1783
1783
|
const parsedOutput = {
|
|
1784
1784
|
...output,
|
|
1785
|
-
body: await
|
|
1785
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
1786
1786
|
};
|
|
1787
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1787
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
1788
1788
|
switch (errorCode) {
|
|
1789
1789
|
case "AccessDeniedException":
|
|
1790
1790
|
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
@@ -2242,49 +2242,8 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
2242
2242
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
2243
2243
|
cfId: output.headers["x-amz-cf-id"]
|
|
2244
2244
|
}), "deserializeMetadata");
|
|
2245
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
2246
2245
|
var _sRIUC = "skipResourceInUseCheck";
|
|
2247
2246
|
var _tK = "tagKeys";
|
|
2248
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
2249
|
-
if (encoded.length) {
|
|
2250
|
-
return JSON.parse(encoded);
|
|
2251
|
-
}
|
|
2252
|
-
return {};
|
|
2253
|
-
}), "parseBody");
|
|
2254
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
2255
|
-
const value = await parseBody(errorBody, context);
|
|
2256
|
-
value.message = value.message ?? value.Message;
|
|
2257
|
-
return value;
|
|
2258
|
-
}, "parseErrorBody");
|
|
2259
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
2260
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
2261
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
2262
|
-
let cleanValue = rawValue;
|
|
2263
|
-
if (typeof cleanValue === "number") {
|
|
2264
|
-
cleanValue = cleanValue.toString();
|
|
2265
|
-
}
|
|
2266
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
2267
|
-
cleanValue = cleanValue.split(",")[0];
|
|
2268
|
-
}
|
|
2269
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
2270
|
-
cleanValue = cleanValue.split(":")[0];
|
|
2271
|
-
}
|
|
2272
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
2273
|
-
cleanValue = cleanValue.split("#")[1];
|
|
2274
|
-
}
|
|
2275
|
-
return cleanValue;
|
|
2276
|
-
}, "sanitizeErrorCode");
|
|
2277
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2278
|
-
if (headerKey !== void 0) {
|
|
2279
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2280
|
-
}
|
|
2281
|
-
if (data.code !== void 0) {
|
|
2282
|
-
return sanitizeErrorCode(data.code);
|
|
2283
|
-
}
|
|
2284
|
-
if (data["__type"] !== void 0) {
|
|
2285
|
-
return sanitizeErrorCode(data["__type"]);
|
|
2286
|
-
}
|
|
2287
|
-
}, "loadRestJsonErrorCode");
|
|
2288
2247
|
|
|
2289
2248
|
// src/commands/AssociateAgentKnowledgeBaseCommand.ts
|
|
2290
2249
|
var _AssociateAgentKnowledgeBaseCommand = class _AssociateAgentKnowledgeBaseCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
|
|
1
|
+
import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
2
2
|
import { requestBuilder as rb } from "@smithy/core";
|
|
3
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
@@ -1635,43 +1635,3 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
1635
1635
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1636
1636
|
const _sRIUC = "skipResourceInUseCheck";
|
|
1637
1637
|
const _tK = "tagKeys";
|
|
1638
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1639
|
-
if (encoded.length) {
|
|
1640
|
-
return JSON.parse(encoded);
|
|
1641
|
-
}
|
|
1642
|
-
return {};
|
|
1643
|
-
});
|
|
1644
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1645
|
-
const value = await parseBody(errorBody, context);
|
|
1646
|
-
value.message = value.message ?? value.Message;
|
|
1647
|
-
return value;
|
|
1648
|
-
};
|
|
1649
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1650
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1651
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1652
|
-
let cleanValue = rawValue;
|
|
1653
|
-
if (typeof cleanValue === "number") {
|
|
1654
|
-
cleanValue = cleanValue.toString();
|
|
1655
|
-
}
|
|
1656
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1657
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1658
|
-
}
|
|
1659
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1660
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1661
|
-
}
|
|
1662
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1663
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1664
|
-
}
|
|
1665
|
-
return cleanValue;
|
|
1666
|
-
};
|
|
1667
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1668
|
-
if (headerKey !== undefined) {
|
|
1669
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1670
|
-
}
|
|
1671
|
-
if (data.code !== undefined) {
|
|
1672
|
-
return sanitizeErrorCode(data.code);
|
|
1673
|
-
}
|
|
1674
|
-
if (data["__type"] !== undefined) {
|
|
1675
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1676
|
-
}
|
|
1677
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-bedrock-agent",
|
|
3
3
|
"description": "AWS SDK for JavaScript Bedrock Agent Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.529.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-agent",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.529.0",
|
|
24
|
+
"@aws-sdk/core": "3.529.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.529.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.523.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.523.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.523.0",
|