@aws-sdk/client-sagemaker-featurestore-runtime 3.489.0 → 3.495.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 CHANGED
@@ -1,11 +1,716 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SageMakerFeatureStoreRuntimeServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./SageMakerFeatureStoreRuntimeClient"), exports);
6
- tslib_1.__exportStar(require("./SageMakerFeatureStoreRuntime"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./models"), exports);
9
- require("@aws-sdk/util-endpoints");
10
- var SageMakerFeatureStoreRuntimeServiceException_1 = require("./models/SageMakerFeatureStoreRuntimeServiceException");
11
- Object.defineProperty(exports, "SageMakerFeatureStoreRuntimeServiceException", { enumerable: true, get: function () { return SageMakerFeatureStoreRuntimeServiceException_1.SageMakerFeatureStoreRuntimeServiceException; } });
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var src_exports = {};
23
+ __export(src_exports, {
24
+ AccessForbidden: () => AccessForbidden,
25
+ BatchGetRecordCommand: () => BatchGetRecordCommand,
26
+ DeleteRecordCommand: () => DeleteRecordCommand,
27
+ DeletionMode: () => DeletionMode,
28
+ ExpirationTimeResponse: () => ExpirationTimeResponse,
29
+ GetRecordCommand: () => GetRecordCommand,
30
+ InternalFailure: () => InternalFailure,
31
+ PutRecordCommand: () => PutRecordCommand,
32
+ ResourceNotFound: () => ResourceNotFound,
33
+ SageMakerFeatureStoreRuntime: () => SageMakerFeatureStoreRuntime,
34
+ SageMakerFeatureStoreRuntimeClient: () => SageMakerFeatureStoreRuntimeClient,
35
+ SageMakerFeatureStoreRuntimeServiceException: () => SageMakerFeatureStoreRuntimeServiceException,
36
+ ServiceUnavailable: () => ServiceUnavailable,
37
+ TargetStore: () => TargetStore,
38
+ TtlDurationUnit: () => TtlDurationUnit,
39
+ ValidationError: () => ValidationError,
40
+ __Client: () => import_smithy_client.Client
41
+ });
42
+ module.exports = __toCommonJS(src_exports);
43
+
44
+ // src/SageMakerFeatureStoreRuntimeClient.ts
45
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
46
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
47
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
48
+ var import_middleware_signing = require("@aws-sdk/middleware-signing");
49
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
50
+ var import_config_resolver = require("@smithy/config-resolver");
51
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
52
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
53
+ var import_middleware_retry = require("@smithy/middleware-retry");
54
+
55
+
56
+ // src/endpoint/EndpointParameters.ts
57
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
58
+ return {
59
+ ...options,
60
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
61
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
62
+ defaultSigningName: "sagemaker"
63
+ };
64
+ }, "resolveClientEndpointParameters");
65
+ var commonParams = {
66
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
67
+ Endpoint: { type: "builtInParams", name: "endpoint" },
68
+ Region: { type: "builtInParams", name: "region" },
69
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
70
+ };
71
+
72
+ // src/SageMakerFeatureStoreRuntimeClient.ts
73
+ var import_runtimeConfig = require("././runtimeConfig");
74
+
75
+ // src/runtimeExtensions.ts
76
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
77
+ var import_protocol_http = require("@smithy/protocol-http");
78
+ var import_smithy_client = require("@smithy/smithy-client");
79
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
80
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
81
+ const extensionConfiguration = {
82
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
83
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
84
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
85
+ };
86
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
87
+ return {
88
+ ...runtimeConfig,
89
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
90
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
91
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
92
+ };
93
+ }, "resolveRuntimeExtensions");
94
+
95
+ // src/SageMakerFeatureStoreRuntimeClient.ts
96
+ var _SageMakerFeatureStoreRuntimeClient = class _SageMakerFeatureStoreRuntimeClient extends import_smithy_client.Client {
97
+ constructor(...[configuration]) {
98
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
99
+ const _config_1 = resolveClientEndpointParameters(_config_0);
100
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
101
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
102
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
103
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
104
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
105
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
106
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
107
+ super(_config_8);
108
+ this.config = _config_8;
109
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
110
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
111
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
112
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
113
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
114
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
115
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
116
+ }
117
+ /**
118
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
119
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
120
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
121
+ */
122
+ destroy() {
123
+ super.destroy();
124
+ }
125
+ };
126
+ __name(_SageMakerFeatureStoreRuntimeClient, "SageMakerFeatureStoreRuntimeClient");
127
+ var SageMakerFeatureStoreRuntimeClient = _SageMakerFeatureStoreRuntimeClient;
128
+
129
+ // src/SageMakerFeatureStoreRuntime.ts
130
+
131
+
132
+ // src/commands/BatchGetRecordCommand.ts
133
+
134
+ var import_middleware_serde = require("@smithy/middleware-serde");
135
+
136
+ var import_types = require("@smithy/types");
137
+
138
+ // src/protocols/Aws_restJson1.ts
139
+ var import_core = require("@smithy/core");
140
+
141
+
142
+ // src/models/SageMakerFeatureStoreRuntimeServiceException.ts
143
+
144
+ var _SageMakerFeatureStoreRuntimeServiceException = class _SageMakerFeatureStoreRuntimeServiceException extends import_smithy_client.ServiceException {
145
+ /**
146
+ * @internal
147
+ */
148
+ constructor(options) {
149
+ super(options);
150
+ Object.setPrototypeOf(this, _SageMakerFeatureStoreRuntimeServiceException.prototype);
151
+ }
152
+ };
153
+ __name(_SageMakerFeatureStoreRuntimeServiceException, "SageMakerFeatureStoreRuntimeServiceException");
154
+ var SageMakerFeatureStoreRuntimeServiceException = _SageMakerFeatureStoreRuntimeServiceException;
155
+
156
+ // src/models/models_0.ts
157
+ var _AccessForbidden = class _AccessForbidden extends SageMakerFeatureStoreRuntimeServiceException {
158
+ /**
159
+ * @internal
160
+ */
161
+ constructor(opts) {
162
+ super({
163
+ name: "AccessForbidden",
164
+ $fault: "client",
165
+ ...opts
166
+ });
167
+ this.name = "AccessForbidden";
168
+ this.$fault = "client";
169
+ Object.setPrototypeOf(this, _AccessForbidden.prototype);
170
+ this.Message = opts.Message;
171
+ }
172
+ };
173
+ __name(_AccessForbidden, "AccessForbidden");
174
+ var AccessForbidden = _AccessForbidden;
175
+ var ExpirationTimeResponse = {
176
+ DISABLED: "Disabled",
177
+ ENABLED: "Enabled"
178
+ };
179
+ var _InternalFailure = class _InternalFailure extends SageMakerFeatureStoreRuntimeServiceException {
180
+ /**
181
+ * @internal
182
+ */
183
+ constructor(opts) {
184
+ super({
185
+ name: "InternalFailure",
186
+ $fault: "server",
187
+ ...opts
188
+ });
189
+ this.name = "InternalFailure";
190
+ this.$fault = "server";
191
+ Object.setPrototypeOf(this, _InternalFailure.prototype);
192
+ this.Message = opts.Message;
193
+ }
194
+ };
195
+ __name(_InternalFailure, "InternalFailure");
196
+ var InternalFailure = _InternalFailure;
197
+ var _ServiceUnavailable = class _ServiceUnavailable extends SageMakerFeatureStoreRuntimeServiceException {
198
+ /**
199
+ * @internal
200
+ */
201
+ constructor(opts) {
202
+ super({
203
+ name: "ServiceUnavailable",
204
+ $fault: "server",
205
+ ...opts
206
+ });
207
+ this.name = "ServiceUnavailable";
208
+ this.$fault = "server";
209
+ Object.setPrototypeOf(this, _ServiceUnavailable.prototype);
210
+ this.Message = opts.Message;
211
+ }
212
+ };
213
+ __name(_ServiceUnavailable, "ServiceUnavailable");
214
+ var ServiceUnavailable = _ServiceUnavailable;
215
+ var _ValidationError = class _ValidationError extends SageMakerFeatureStoreRuntimeServiceException {
216
+ /**
217
+ * @internal
218
+ */
219
+ constructor(opts) {
220
+ super({
221
+ name: "ValidationError",
222
+ $fault: "client",
223
+ ...opts
224
+ });
225
+ this.name = "ValidationError";
226
+ this.$fault = "client";
227
+ Object.setPrototypeOf(this, _ValidationError.prototype);
228
+ this.Message = opts.Message;
229
+ }
230
+ };
231
+ __name(_ValidationError, "ValidationError");
232
+ var ValidationError = _ValidationError;
233
+ var DeletionMode = {
234
+ HARD_DELETE: "HardDelete",
235
+ SOFT_DELETE: "SoftDelete"
236
+ };
237
+ var TargetStore = {
238
+ OFFLINE_STORE: "OfflineStore",
239
+ ONLINE_STORE: "OnlineStore"
240
+ };
241
+ var _ResourceNotFound = class _ResourceNotFound extends SageMakerFeatureStoreRuntimeServiceException {
242
+ /**
243
+ * @internal
244
+ */
245
+ constructor(opts) {
246
+ super({
247
+ name: "ResourceNotFound",
248
+ $fault: "client",
249
+ ...opts
250
+ });
251
+ this.name = "ResourceNotFound";
252
+ this.$fault = "client";
253
+ Object.setPrototypeOf(this, _ResourceNotFound.prototype);
254
+ this.Message = opts.Message;
255
+ }
256
+ };
257
+ __name(_ResourceNotFound, "ResourceNotFound");
258
+ var ResourceNotFound = _ResourceNotFound;
259
+ var TtlDurationUnit = {
260
+ DAYS: "Days",
261
+ HOURS: "Hours",
262
+ MINUTES: "Minutes",
263
+ SECONDS: "Seconds",
264
+ WEEKS: "Weeks"
265
+ };
266
+
267
+ // src/protocols/Aws_restJson1.ts
268
+ var se_BatchGetRecordCommand = /* @__PURE__ */ __name(async (input, context) => {
269
+ const b = (0, import_core.requestBuilder)(input, context);
270
+ const headers = {
271
+ "content-type": "application/json"
272
+ };
273
+ b.bp("/BatchGetRecord");
274
+ let body;
275
+ body = JSON.stringify(
276
+ (0, import_smithy_client.take)(input, {
277
+ ExpirationTimeResponse: [],
278
+ Identifiers: (_) => (0, import_smithy_client._json)(_)
279
+ })
280
+ );
281
+ b.m("POST").h(headers).b(body);
282
+ return b.build();
283
+ }, "se_BatchGetRecordCommand");
284
+ var se_DeleteRecordCommand = /* @__PURE__ */ __name(async (input, context) => {
285
+ const b = (0, import_core.requestBuilder)(input, context);
286
+ const headers = {};
287
+ b.bp("/FeatureGroup/{FeatureGroupName}");
288
+ b.p("FeatureGroupName", () => input.FeatureGroupName, "{FeatureGroupName}", false);
289
+ const query = (0, import_smithy_client.map)({
290
+ [_RIVAS]: [, (0, import_smithy_client.expectNonNull)(input[_RIVAS], `RecordIdentifierValueAsString`)],
291
+ [_ET]: [, (0, import_smithy_client.expectNonNull)(input[_ET], `EventTime`)],
292
+ [_TS]: [() => input.TargetStores !== void 0, () => (input[_TS] || []).map((_entry) => _entry)],
293
+ [_DM]: [, input[_DM]]
294
+ });
295
+ let body;
296
+ b.m("DELETE").h(headers).q(query).b(body);
297
+ return b.build();
298
+ }, "se_DeleteRecordCommand");
299
+ var se_GetRecordCommand = /* @__PURE__ */ __name(async (input, context) => {
300
+ const b = (0, import_core.requestBuilder)(input, context);
301
+ const headers = {};
302
+ b.bp("/FeatureGroup/{FeatureGroupName}");
303
+ b.p("FeatureGroupName", () => input.FeatureGroupName, "{FeatureGroupName}", false);
304
+ const query = (0, import_smithy_client.map)({
305
+ [_RIVAS]: [, (0, import_smithy_client.expectNonNull)(input[_RIVAS], `RecordIdentifierValueAsString`)],
306
+ [_FNe]: [() => input.FeatureNames !== void 0, () => (input[_FN] || []).map((_entry) => _entry)],
307
+ [_ETR]: [, input[_ETR]]
308
+ });
309
+ let body;
310
+ b.m("GET").h(headers).q(query).b(body);
311
+ return b.build();
312
+ }, "se_GetRecordCommand");
313
+ var se_PutRecordCommand = /* @__PURE__ */ __name(async (input, context) => {
314
+ const b = (0, import_core.requestBuilder)(input, context);
315
+ const headers = {
316
+ "content-type": "application/json"
317
+ };
318
+ b.bp("/FeatureGroup/{FeatureGroupName}");
319
+ b.p("FeatureGroupName", () => input.FeatureGroupName, "{FeatureGroupName}", false);
320
+ let body;
321
+ body = JSON.stringify(
322
+ (0, import_smithy_client.take)(input, {
323
+ Record: (_) => (0, import_smithy_client._json)(_),
324
+ TargetStores: (_) => (0, import_smithy_client._json)(_),
325
+ TtlDuration: (_) => (0, import_smithy_client._json)(_)
326
+ })
327
+ );
328
+ b.m("PUT").h(headers).b(body);
329
+ return b.build();
330
+ }, "se_PutRecordCommand");
331
+ var de_BatchGetRecordCommand = /* @__PURE__ */ __name(async (output, context) => {
332
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
333
+ return de_BatchGetRecordCommandError(output, context);
334
+ }
335
+ const contents = (0, import_smithy_client.map)({
336
+ $metadata: deserializeMetadata(output)
337
+ });
338
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
339
+ const doc = (0, import_smithy_client.take)(data, {
340
+ Errors: import_smithy_client._json,
341
+ Records: import_smithy_client._json,
342
+ UnprocessedIdentifiers: import_smithy_client._json
343
+ });
344
+ Object.assign(contents, doc);
345
+ return contents;
346
+ }, "de_BatchGetRecordCommand");
347
+ var de_BatchGetRecordCommandError = /* @__PURE__ */ __name(async (output, context) => {
348
+ const parsedOutput = {
349
+ ...output,
350
+ body: await parseErrorBody(output.body, context)
351
+ };
352
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
353
+ switch (errorCode) {
354
+ case "AccessForbidden":
355
+ case "com.amazonaws.sagemakerfeaturestoreruntime#AccessForbidden":
356
+ throw await de_AccessForbiddenRes(parsedOutput, context);
357
+ case "InternalFailure":
358
+ case "com.amazonaws.sagemakerfeaturestoreruntime#InternalFailure":
359
+ throw await de_InternalFailureRes(parsedOutput, context);
360
+ case "ServiceUnavailable":
361
+ case "com.amazonaws.sagemakerfeaturestoreruntime#ServiceUnavailable":
362
+ throw await de_ServiceUnavailableRes(parsedOutput, context);
363
+ case "ValidationError":
364
+ case "com.amazonaws.sagemakerfeaturestoreruntime#ValidationError":
365
+ throw await de_ValidationErrorRes(parsedOutput, context);
366
+ default:
367
+ const parsedBody = parsedOutput.body;
368
+ return throwDefaultError({
369
+ output,
370
+ parsedBody,
371
+ errorCode
372
+ });
373
+ }
374
+ }, "de_BatchGetRecordCommandError");
375
+ var de_DeleteRecordCommand = /* @__PURE__ */ __name(async (output, context) => {
376
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
377
+ return de_DeleteRecordCommandError(output, context);
378
+ }
379
+ const contents = (0, import_smithy_client.map)({
380
+ $metadata: deserializeMetadata(output)
381
+ });
382
+ await (0, import_smithy_client.collectBody)(output.body, context);
383
+ return contents;
384
+ }, "de_DeleteRecordCommand");
385
+ var de_DeleteRecordCommandError = /* @__PURE__ */ __name(async (output, context) => {
386
+ const parsedOutput = {
387
+ ...output,
388
+ body: await parseErrorBody(output.body, context)
389
+ };
390
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
391
+ switch (errorCode) {
392
+ case "AccessForbidden":
393
+ case "com.amazonaws.sagemakerfeaturestoreruntime#AccessForbidden":
394
+ throw await de_AccessForbiddenRes(parsedOutput, context);
395
+ case "InternalFailure":
396
+ case "com.amazonaws.sagemakerfeaturestoreruntime#InternalFailure":
397
+ throw await de_InternalFailureRes(parsedOutput, context);
398
+ case "ServiceUnavailable":
399
+ case "com.amazonaws.sagemakerfeaturestoreruntime#ServiceUnavailable":
400
+ throw await de_ServiceUnavailableRes(parsedOutput, context);
401
+ case "ValidationError":
402
+ case "com.amazonaws.sagemakerfeaturestoreruntime#ValidationError":
403
+ throw await de_ValidationErrorRes(parsedOutput, context);
404
+ default:
405
+ const parsedBody = parsedOutput.body;
406
+ return throwDefaultError({
407
+ output,
408
+ parsedBody,
409
+ errorCode
410
+ });
411
+ }
412
+ }, "de_DeleteRecordCommandError");
413
+ var de_GetRecordCommand = /* @__PURE__ */ __name(async (output, context) => {
414
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
415
+ return de_GetRecordCommandError(output, context);
416
+ }
417
+ const contents = (0, import_smithy_client.map)({
418
+ $metadata: deserializeMetadata(output)
419
+ });
420
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
421
+ const doc = (0, import_smithy_client.take)(data, {
422
+ ExpiresAt: import_smithy_client.expectString,
423
+ Record: import_smithy_client._json
424
+ });
425
+ Object.assign(contents, doc);
426
+ return contents;
427
+ }, "de_GetRecordCommand");
428
+ var de_GetRecordCommandError = /* @__PURE__ */ __name(async (output, context) => {
429
+ const parsedOutput = {
430
+ ...output,
431
+ body: await parseErrorBody(output.body, context)
432
+ };
433
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
434
+ switch (errorCode) {
435
+ case "AccessForbidden":
436
+ case "com.amazonaws.sagemakerfeaturestoreruntime#AccessForbidden":
437
+ throw await de_AccessForbiddenRes(parsedOutput, context);
438
+ case "InternalFailure":
439
+ case "com.amazonaws.sagemakerfeaturestoreruntime#InternalFailure":
440
+ throw await de_InternalFailureRes(parsedOutput, context);
441
+ case "ResourceNotFound":
442
+ case "com.amazonaws.sagemakerfeaturestoreruntime#ResourceNotFound":
443
+ throw await de_ResourceNotFoundRes(parsedOutput, context);
444
+ case "ServiceUnavailable":
445
+ case "com.amazonaws.sagemakerfeaturestoreruntime#ServiceUnavailable":
446
+ throw await de_ServiceUnavailableRes(parsedOutput, context);
447
+ case "ValidationError":
448
+ case "com.amazonaws.sagemakerfeaturestoreruntime#ValidationError":
449
+ throw await de_ValidationErrorRes(parsedOutput, context);
450
+ default:
451
+ const parsedBody = parsedOutput.body;
452
+ return throwDefaultError({
453
+ output,
454
+ parsedBody,
455
+ errorCode
456
+ });
457
+ }
458
+ }, "de_GetRecordCommandError");
459
+ var de_PutRecordCommand = /* @__PURE__ */ __name(async (output, context) => {
460
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
461
+ return de_PutRecordCommandError(output, context);
462
+ }
463
+ const contents = (0, import_smithy_client.map)({
464
+ $metadata: deserializeMetadata(output)
465
+ });
466
+ await (0, import_smithy_client.collectBody)(output.body, context);
467
+ return contents;
468
+ }, "de_PutRecordCommand");
469
+ var de_PutRecordCommandError = /* @__PURE__ */ __name(async (output, context) => {
470
+ const parsedOutput = {
471
+ ...output,
472
+ body: await parseErrorBody(output.body, context)
473
+ };
474
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
475
+ switch (errorCode) {
476
+ case "AccessForbidden":
477
+ case "com.amazonaws.sagemakerfeaturestoreruntime#AccessForbidden":
478
+ throw await de_AccessForbiddenRes(parsedOutput, context);
479
+ case "InternalFailure":
480
+ case "com.amazonaws.sagemakerfeaturestoreruntime#InternalFailure":
481
+ throw await de_InternalFailureRes(parsedOutput, context);
482
+ case "ServiceUnavailable":
483
+ case "com.amazonaws.sagemakerfeaturestoreruntime#ServiceUnavailable":
484
+ throw await de_ServiceUnavailableRes(parsedOutput, context);
485
+ case "ValidationError":
486
+ case "com.amazonaws.sagemakerfeaturestoreruntime#ValidationError":
487
+ throw await de_ValidationErrorRes(parsedOutput, context);
488
+ default:
489
+ const parsedBody = parsedOutput.body;
490
+ return throwDefaultError({
491
+ output,
492
+ parsedBody,
493
+ errorCode
494
+ });
495
+ }
496
+ }, "de_PutRecordCommandError");
497
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(SageMakerFeatureStoreRuntimeServiceException);
498
+ var de_AccessForbiddenRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
499
+ const contents = (0, import_smithy_client.map)({});
500
+ const data = parsedOutput.body;
501
+ const doc = (0, import_smithy_client.take)(data, {
502
+ Message: import_smithy_client.expectString
503
+ });
504
+ Object.assign(contents, doc);
505
+ const exception = new AccessForbidden({
506
+ $metadata: deserializeMetadata(parsedOutput),
507
+ ...contents
508
+ });
509
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
510
+ }, "de_AccessForbiddenRes");
511
+ var de_InternalFailureRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
512
+ const contents = (0, import_smithy_client.map)({});
513
+ const data = parsedOutput.body;
514
+ const doc = (0, import_smithy_client.take)(data, {
515
+ Message: import_smithy_client.expectString
516
+ });
517
+ Object.assign(contents, doc);
518
+ const exception = new InternalFailure({
519
+ $metadata: deserializeMetadata(parsedOutput),
520
+ ...contents
521
+ });
522
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
523
+ }, "de_InternalFailureRes");
524
+ var de_ResourceNotFoundRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
525
+ const contents = (0, import_smithy_client.map)({});
526
+ const data = parsedOutput.body;
527
+ const doc = (0, import_smithy_client.take)(data, {
528
+ Message: import_smithy_client.expectString
529
+ });
530
+ Object.assign(contents, doc);
531
+ const exception = new ResourceNotFound({
532
+ $metadata: deserializeMetadata(parsedOutput),
533
+ ...contents
534
+ });
535
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
536
+ }, "de_ResourceNotFoundRes");
537
+ var de_ServiceUnavailableRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
538
+ const contents = (0, import_smithy_client.map)({});
539
+ const data = parsedOutput.body;
540
+ const doc = (0, import_smithy_client.take)(data, {
541
+ Message: import_smithy_client.expectString
542
+ });
543
+ Object.assign(contents, doc);
544
+ const exception = new ServiceUnavailable({
545
+ $metadata: deserializeMetadata(parsedOutput),
546
+ ...contents
547
+ });
548
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
549
+ }, "de_ServiceUnavailableRes");
550
+ var de_ValidationErrorRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
551
+ const contents = (0, import_smithy_client.map)({});
552
+ const data = parsedOutput.body;
553
+ const doc = (0, import_smithy_client.take)(data, {
554
+ Message: import_smithy_client.expectString
555
+ });
556
+ Object.assign(contents, doc);
557
+ const exception = new ValidationError({
558
+ $metadata: deserializeMetadata(parsedOutput),
559
+ ...contents
560
+ });
561
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
562
+ }, "de_ValidationErrorRes");
563
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
564
+ httpStatusCode: output.statusCode,
565
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
566
+ extendedRequestId: output.headers["x-amz-id-2"],
567
+ cfId: output.headers["x-amz-cf-id"]
568
+ }), "deserializeMetadata");
569
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
570
+ var _DM = "DeletionMode";
571
+ var _ET = "EventTime";
572
+ var _ETR = "ExpirationTimeResponse";
573
+ var _FN = "FeatureNames";
574
+ var _FNe = "FeatureName";
575
+ var _RIVAS = "RecordIdentifierValueAsString";
576
+ var _TS = "TargetStores";
577
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
578
+ if (encoded.length) {
579
+ return JSON.parse(encoded);
580
+ }
581
+ return {};
582
+ }), "parseBody");
583
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
584
+ const value = await parseBody(errorBody, context);
585
+ value.message = value.message ?? value.Message;
586
+ return value;
587
+ }, "parseErrorBody");
588
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
589
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
590
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
591
+ let cleanValue = rawValue;
592
+ if (typeof cleanValue === "number") {
593
+ cleanValue = cleanValue.toString();
594
+ }
595
+ if (cleanValue.indexOf(",") >= 0) {
596
+ cleanValue = cleanValue.split(",")[0];
597
+ }
598
+ if (cleanValue.indexOf(":") >= 0) {
599
+ cleanValue = cleanValue.split(":")[0];
600
+ }
601
+ if (cleanValue.indexOf("#") >= 0) {
602
+ cleanValue = cleanValue.split("#")[1];
603
+ }
604
+ return cleanValue;
605
+ }, "sanitizeErrorCode");
606
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
607
+ if (headerKey !== void 0) {
608
+ return sanitizeErrorCode(output.headers[headerKey]);
609
+ }
610
+ if (data.code !== void 0) {
611
+ return sanitizeErrorCode(data.code);
612
+ }
613
+ if (data["__type"] !== void 0) {
614
+ return sanitizeErrorCode(data["__type"]);
615
+ }
616
+ }, "loadRestJsonErrorCode");
617
+
618
+ // src/commands/BatchGetRecordCommand.ts
619
+ var _BatchGetRecordCommand = class _BatchGetRecordCommand extends import_smithy_client.Command.classBuilder().ep({
620
+ ...commonParams
621
+ }).m(function(Command, cs, config, o) {
622
+ return [
623
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
624
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
625
+ ];
626
+ }).s("AmazonSageMakerFeatureStoreRuntime", "BatchGetRecord", {}).n("SageMakerFeatureStoreRuntimeClient", "BatchGetRecordCommand").f(void 0, void 0).ser(se_BatchGetRecordCommand).de(de_BatchGetRecordCommand).build() {
627
+ };
628
+ __name(_BatchGetRecordCommand, "BatchGetRecordCommand");
629
+ var BatchGetRecordCommand = _BatchGetRecordCommand;
630
+
631
+ // src/commands/DeleteRecordCommand.ts
632
+
633
+
634
+
635
+
636
+ var _DeleteRecordCommand = class _DeleteRecordCommand extends import_smithy_client.Command.classBuilder().ep({
637
+ ...commonParams
638
+ }).m(function(Command, cs, config, o) {
639
+ return [
640
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
641
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
642
+ ];
643
+ }).s("AmazonSageMakerFeatureStoreRuntime", "DeleteRecord", {}).n("SageMakerFeatureStoreRuntimeClient", "DeleteRecordCommand").f(void 0, void 0).ser(se_DeleteRecordCommand).de(de_DeleteRecordCommand).build() {
644
+ };
645
+ __name(_DeleteRecordCommand, "DeleteRecordCommand");
646
+ var DeleteRecordCommand = _DeleteRecordCommand;
647
+
648
+ // src/commands/GetRecordCommand.ts
649
+
650
+
651
+
652
+
653
+ var _GetRecordCommand = class _GetRecordCommand extends import_smithy_client.Command.classBuilder().ep({
654
+ ...commonParams
655
+ }).m(function(Command, cs, config, o) {
656
+ return [
657
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
658
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
659
+ ];
660
+ }).s("AmazonSageMakerFeatureStoreRuntime", "GetRecord", {}).n("SageMakerFeatureStoreRuntimeClient", "GetRecordCommand").f(void 0, void 0).ser(se_GetRecordCommand).de(de_GetRecordCommand).build() {
661
+ };
662
+ __name(_GetRecordCommand, "GetRecordCommand");
663
+ var GetRecordCommand = _GetRecordCommand;
664
+
665
+ // src/commands/PutRecordCommand.ts
666
+
667
+
668
+
669
+
670
+ var _PutRecordCommand = class _PutRecordCommand extends import_smithy_client.Command.classBuilder().ep({
671
+ ...commonParams
672
+ }).m(function(Command, cs, config, o) {
673
+ return [
674
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
675
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
676
+ ];
677
+ }).s("AmazonSageMakerFeatureStoreRuntime", "PutRecord", {}).n("SageMakerFeatureStoreRuntimeClient", "PutRecordCommand").f(void 0, void 0).ser(se_PutRecordCommand).de(de_PutRecordCommand).build() {
678
+ };
679
+ __name(_PutRecordCommand, "PutRecordCommand");
680
+ var PutRecordCommand = _PutRecordCommand;
681
+
682
+ // src/SageMakerFeatureStoreRuntime.ts
683
+ var commands = {
684
+ BatchGetRecordCommand,
685
+ DeleteRecordCommand,
686
+ GetRecordCommand,
687
+ PutRecordCommand
688
+ };
689
+ var _SageMakerFeatureStoreRuntime = class _SageMakerFeatureStoreRuntime extends SageMakerFeatureStoreRuntimeClient {
690
+ };
691
+ __name(_SageMakerFeatureStoreRuntime, "SageMakerFeatureStoreRuntime");
692
+ var SageMakerFeatureStoreRuntime = _SageMakerFeatureStoreRuntime;
693
+ (0, import_smithy_client.createAggregatedClient)(commands, SageMakerFeatureStoreRuntime);
694
+
695
+ // src/index.ts
696
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
697
+ // Annotate the CommonJS export names for ESM import in node:
698
+ 0 && (module.exports = {
699
+ AccessForbidden,
700
+ BatchGetRecordCommand,
701
+ DeleteRecordCommand,
702
+ DeletionMode,
703
+ ExpirationTimeResponse,
704
+ GetRecordCommand,
705
+ InternalFailure,
706
+ PutRecordCommand,
707
+ ResourceNotFound,
708
+ SageMakerFeatureStoreRuntime,
709
+ SageMakerFeatureStoreRuntimeClient,
710
+ SageMakerFeatureStoreRuntimeServiceException,
711
+ ServiceUnavailable,
712
+ TargetStore,
713
+ TtlDurationUnit,
714
+ ValidationError,
715
+ __Client
716
+ });