@aws-sdk/client-sagemaker-featurestore-runtime 3.525.0 → 3.529.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +5 -45
- package/dist-es/protocols/Aws_restJson1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -194,6 +194,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
194
194
|
var import_types = require("@smithy/types");
|
|
195
195
|
|
|
196
196
|
// src/protocols/Aws_restJson1.ts
|
|
197
|
+
var import_core2 = require("@aws-sdk/core");
|
|
197
198
|
|
|
198
199
|
|
|
199
200
|
|
|
@@ -393,7 +394,7 @@ var de_BatchGetRecordCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
393
394
|
const contents = (0, import_smithy_client.map)({
|
|
394
395
|
$metadata: deserializeMetadata(output)
|
|
395
396
|
});
|
|
396
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
397
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
397
398
|
const doc = (0, import_smithy_client.take)(data, {
|
|
398
399
|
Errors: import_smithy_client._json,
|
|
399
400
|
Records: import_smithy_client._json,
|
|
@@ -419,7 +420,7 @@ var de_GetRecordCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
419
420
|
const contents = (0, import_smithy_client.map)({
|
|
420
421
|
$metadata: deserializeMetadata(output)
|
|
421
422
|
});
|
|
422
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
423
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
423
424
|
const doc = (0, import_smithy_client.take)(data, {
|
|
424
425
|
ExpiresAt: import_smithy_client.expectString,
|
|
425
426
|
Record: import_smithy_client._json
|
|
@@ -440,9 +441,9 @@ var de_PutRecordCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
440
441
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
441
442
|
const parsedOutput = {
|
|
442
443
|
...output,
|
|
443
|
-
body: await
|
|
444
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
444
445
|
};
|
|
445
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
446
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
446
447
|
switch (errorCode) {
|
|
447
448
|
case "AccessForbidden":
|
|
448
449
|
case "com.amazonaws.sagemakerfeaturestoreruntime#AccessForbidden":
|
|
@@ -540,7 +541,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
540
541
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
541
542
|
cfId: output.headers["x-amz-cf-id"]
|
|
542
543
|
}), "deserializeMetadata");
|
|
543
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
544
544
|
var _DM = "DeletionMode";
|
|
545
545
|
var _ET = "EventTime";
|
|
546
546
|
var _ETR = "ExpirationTimeResponse";
|
|
@@ -548,46 +548,6 @@ var _FN = "FeatureNames";
|
|
|
548
548
|
var _FNe = "FeatureName";
|
|
549
549
|
var _RIVAS = "RecordIdentifierValueAsString";
|
|
550
550
|
var _TS = "TargetStores";
|
|
551
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
552
|
-
if (encoded.length) {
|
|
553
|
-
return JSON.parse(encoded);
|
|
554
|
-
}
|
|
555
|
-
return {};
|
|
556
|
-
}), "parseBody");
|
|
557
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
558
|
-
const value = await parseBody(errorBody, context);
|
|
559
|
-
value.message = value.message ?? value.Message;
|
|
560
|
-
return value;
|
|
561
|
-
}, "parseErrorBody");
|
|
562
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
563
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
564
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
565
|
-
let cleanValue = rawValue;
|
|
566
|
-
if (typeof cleanValue === "number") {
|
|
567
|
-
cleanValue = cleanValue.toString();
|
|
568
|
-
}
|
|
569
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
570
|
-
cleanValue = cleanValue.split(",")[0];
|
|
571
|
-
}
|
|
572
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
573
|
-
cleanValue = cleanValue.split(":")[0];
|
|
574
|
-
}
|
|
575
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
576
|
-
cleanValue = cleanValue.split("#")[1];
|
|
577
|
-
}
|
|
578
|
-
return cleanValue;
|
|
579
|
-
}, "sanitizeErrorCode");
|
|
580
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
581
|
-
if (headerKey !== void 0) {
|
|
582
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
583
|
-
}
|
|
584
|
-
if (data.code !== void 0) {
|
|
585
|
-
return sanitizeErrorCode(data.code);
|
|
586
|
-
}
|
|
587
|
-
if (data["__type"] !== void 0) {
|
|
588
|
-
return sanitizeErrorCode(data["__type"]);
|
|
589
|
-
}
|
|
590
|
-
}, "loadRestJsonErrorCode");
|
|
591
551
|
|
|
592
552
|
// src/commands/BatchGetRecordCommand.ts
|
|
593
553
|
var _BatchGetRecordCommand = class _BatchGetRecordCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
1
2
|
import { requestBuilder as rb } from "@smithy/core";
|
|
2
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { AccessForbidden, InternalFailure, ResourceNotFound, ServiceUnavailable, ValidationError, } from "../models/models_0";
|
|
@@ -228,43 +229,3 @@ const _FN = "FeatureNames";
|
|
|
228
229
|
const _FNe = "FeatureName";
|
|
229
230
|
const _RIVAS = "RecordIdentifierValueAsString";
|
|
230
231
|
const _TS = "TargetStores";
|
|
231
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
232
|
-
if (encoded.length) {
|
|
233
|
-
return JSON.parse(encoded);
|
|
234
|
-
}
|
|
235
|
-
return {};
|
|
236
|
-
});
|
|
237
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
238
|
-
const value = await parseBody(errorBody, context);
|
|
239
|
-
value.message = value.message ?? value.Message;
|
|
240
|
-
return value;
|
|
241
|
-
};
|
|
242
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
243
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
244
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
245
|
-
let cleanValue = rawValue;
|
|
246
|
-
if (typeof cleanValue === "number") {
|
|
247
|
-
cleanValue = cleanValue.toString();
|
|
248
|
-
}
|
|
249
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
250
|
-
cleanValue = cleanValue.split(",")[0];
|
|
251
|
-
}
|
|
252
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
253
|
-
cleanValue = cleanValue.split(":")[0];
|
|
254
|
-
}
|
|
255
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
256
|
-
cleanValue = cleanValue.split("#")[1];
|
|
257
|
-
}
|
|
258
|
-
return cleanValue;
|
|
259
|
-
};
|
|
260
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
261
|
-
if (headerKey !== undefined) {
|
|
262
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
263
|
-
}
|
|
264
|
-
if (data.code !== undefined) {
|
|
265
|
-
return sanitizeErrorCode(data.code);
|
|
266
|
-
}
|
|
267
|
-
if (data["__type"] !== undefined) {
|
|
268
|
-
return sanitizeErrorCode(data["__type"]);
|
|
269
|
-
}
|
|
270
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sagemaker-featurestore-runtime",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sagemaker Featurestore Runtime Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.529.1",
|
|
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-sagemaker-featurestore-runtime",
|
|
@@ -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.1",
|
|
24
|
+
"@aws-sdk/core": "3.529.1",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.529.1",
|
|
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",
|