@aws-sdk/client-payment-cryptography-data 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,1882 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaymentCryptographyDataServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./PaymentCryptographyDataClient"), exports);
6
- tslib_1.__exportStar(require("./PaymentCryptographyData"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./models"), exports);
9
- require("@aws-sdk/util-endpoints");
10
- var PaymentCryptographyDataServiceException_1 = require("./models/PaymentCryptographyDataServiceException");
11
- Object.defineProperty(exports, "PaymentCryptographyDataServiceException", { enumerable: true, get: function () { return PaymentCryptographyDataServiceException_1.PaymentCryptographyDataServiceException; } });
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
+ AccessDeniedException: () => AccessDeniedException,
25
+ CardGenerationAttributes: () => CardGenerationAttributes,
26
+ CardVerificationAttributes: () => CardVerificationAttributes,
27
+ CryptogramAuthResponse: () => CryptogramAuthResponse,
28
+ DecryptDataCommand: () => DecryptDataCommand,
29
+ DecryptDataInputFilterSensitiveLog: () => DecryptDataInputFilterSensitiveLog,
30
+ DecryptDataOutputFilterSensitiveLog: () => DecryptDataOutputFilterSensitiveLog,
31
+ DukptDerivationType: () => DukptDerivationType,
32
+ DukptEncryptionAttributesFilterSensitiveLog: () => DukptEncryptionAttributesFilterSensitiveLog,
33
+ DukptEncryptionMode: () => DukptEncryptionMode,
34
+ DukptKeyVariant: () => DukptKeyVariant,
35
+ EncryptDataCommand: () => EncryptDataCommand,
36
+ EncryptDataInputFilterSensitiveLog: () => EncryptDataInputFilterSensitiveLog,
37
+ EncryptDataOutputFilterSensitiveLog: () => EncryptDataOutputFilterSensitiveLog,
38
+ EncryptionDecryptionAttributes: () => EncryptionDecryptionAttributes,
39
+ EncryptionDecryptionAttributesFilterSensitiveLog: () => EncryptionDecryptionAttributesFilterSensitiveLog,
40
+ EncryptionMode: () => EncryptionMode,
41
+ GenerateCardValidationDataCommand: () => GenerateCardValidationDataCommand,
42
+ GenerateCardValidationDataInputFilterSensitiveLog: () => GenerateCardValidationDataInputFilterSensitiveLog,
43
+ GenerateMacCommand: () => GenerateMacCommand,
44
+ GenerateMacInputFilterSensitiveLog: () => GenerateMacInputFilterSensitiveLog,
45
+ GeneratePinDataCommand: () => GeneratePinDataCommand,
46
+ GeneratePinDataInputFilterSensitiveLog: () => GeneratePinDataInputFilterSensitiveLog,
47
+ InternalServerException: () => InternalServerException,
48
+ MacAlgorithm: () => MacAlgorithm,
49
+ MacAlgorithmEmvFilterSensitiveLog: () => MacAlgorithmEmvFilterSensitiveLog,
50
+ MacAttributes: () => MacAttributes,
51
+ MacAttributesFilterSensitiveLog: () => MacAttributesFilterSensitiveLog,
52
+ MajorKeyDerivationMode: () => MajorKeyDerivationMode,
53
+ PaddingType: () => PaddingType,
54
+ PaymentCryptographyData: () => PaymentCryptographyData,
55
+ PaymentCryptographyDataClient: () => PaymentCryptographyDataClient,
56
+ PaymentCryptographyDataServiceException: () => PaymentCryptographyDataServiceException,
57
+ PinBlockFormatForPinData: () => PinBlockFormatForPinData,
58
+ PinData: () => PinData,
59
+ PinGenerationAttributes: () => PinGenerationAttributes,
60
+ PinVerificationAttributes: () => PinVerificationAttributes,
61
+ ReEncryptDataCommand: () => ReEncryptDataCommand,
62
+ ReEncryptDataInputFilterSensitiveLog: () => ReEncryptDataInputFilterSensitiveLog,
63
+ ReEncryptDataOutputFilterSensitiveLog: () => ReEncryptDataOutputFilterSensitiveLog,
64
+ ReEncryptionAttributes: () => ReEncryptionAttributes,
65
+ ReEncryptionAttributesFilterSensitiveLog: () => ReEncryptionAttributesFilterSensitiveLog,
66
+ ResourceNotFoundException: () => ResourceNotFoundException,
67
+ SessionKeyAmexFilterSensitiveLog: () => SessionKeyAmexFilterSensitiveLog,
68
+ SessionKeyDerivation: () => SessionKeyDerivation,
69
+ SessionKeyDerivationFilterSensitiveLog: () => SessionKeyDerivationFilterSensitiveLog,
70
+ SessionKeyDerivationMode: () => SessionKeyDerivationMode,
71
+ SessionKeyDerivationValue: () => SessionKeyDerivationValue,
72
+ SessionKeyEmv2000FilterSensitiveLog: () => SessionKeyEmv2000FilterSensitiveLog,
73
+ SessionKeyEmvCommonFilterSensitiveLog: () => SessionKeyEmvCommonFilterSensitiveLog,
74
+ SessionKeyMastercardFilterSensitiveLog: () => SessionKeyMastercardFilterSensitiveLog,
75
+ SessionKeyVisaFilterSensitiveLog: () => SessionKeyVisaFilterSensitiveLog,
76
+ SymmetricEncryptionAttributesFilterSensitiveLog: () => SymmetricEncryptionAttributesFilterSensitiveLog,
77
+ ThrottlingException: () => ThrottlingException,
78
+ TranslatePinDataCommand: () => TranslatePinDataCommand,
79
+ TranslatePinDataInputFilterSensitiveLog: () => TranslatePinDataInputFilterSensitiveLog,
80
+ TranslationIsoFormats: () => TranslationIsoFormats,
81
+ TranslationIsoFormatsFilterSensitiveLog: () => TranslationIsoFormatsFilterSensitiveLog,
82
+ TranslationPinDataIsoFormat034FilterSensitiveLog: () => TranslationPinDataIsoFormat034FilterSensitiveLog,
83
+ ValidationException: () => ValidationException,
84
+ VerificationFailedException: () => VerificationFailedException,
85
+ VerificationFailedReason: () => VerificationFailedReason,
86
+ VerifyAuthRequestCryptogramCommand: () => VerifyAuthRequestCryptogramCommand,
87
+ VerifyAuthRequestCryptogramInputFilterSensitiveLog: () => VerifyAuthRequestCryptogramInputFilterSensitiveLog,
88
+ VerifyCardValidationDataCommand: () => VerifyCardValidationDataCommand,
89
+ VerifyCardValidationDataInputFilterSensitiveLog: () => VerifyCardValidationDataInputFilterSensitiveLog,
90
+ VerifyMacCommand: () => VerifyMacCommand,
91
+ VerifyMacInputFilterSensitiveLog: () => VerifyMacInputFilterSensitiveLog,
92
+ VerifyPinDataCommand: () => VerifyPinDataCommand,
93
+ VerifyPinDataInputFilterSensitiveLog: () => VerifyPinDataInputFilterSensitiveLog,
94
+ __Client: () => import_smithy_client.Client
95
+ });
96
+ module.exports = __toCommonJS(src_exports);
97
+
98
+ // src/PaymentCryptographyDataClient.ts
99
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
100
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
101
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
102
+ var import_middleware_signing = require("@aws-sdk/middleware-signing");
103
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
104
+ var import_config_resolver = require("@smithy/config-resolver");
105
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
106
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
107
+ var import_middleware_retry = require("@smithy/middleware-retry");
108
+
109
+
110
+ // src/endpoint/EndpointParameters.ts
111
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
112
+ return {
113
+ ...options,
114
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
115
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
116
+ defaultSigningName: "payment-cryptography"
117
+ };
118
+ }, "resolveClientEndpointParameters");
119
+ var commonParams = {
120
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
121
+ Endpoint: { type: "builtInParams", name: "endpoint" },
122
+ Region: { type: "builtInParams", name: "region" },
123
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
124
+ };
125
+
126
+ // src/PaymentCryptographyDataClient.ts
127
+ var import_runtimeConfig = require("././runtimeConfig");
128
+
129
+ // src/runtimeExtensions.ts
130
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
131
+ var import_protocol_http = require("@smithy/protocol-http");
132
+ var import_smithy_client = require("@smithy/smithy-client");
133
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
134
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
135
+ const extensionConfiguration = {
136
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
137
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
138
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
139
+ };
140
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
141
+ return {
142
+ ...runtimeConfig,
143
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
144
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
145
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
146
+ };
147
+ }, "resolveRuntimeExtensions");
148
+
149
+ // src/PaymentCryptographyDataClient.ts
150
+ var _PaymentCryptographyDataClient = class _PaymentCryptographyDataClient extends import_smithy_client.Client {
151
+ constructor(...[configuration]) {
152
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
153
+ const _config_1 = resolveClientEndpointParameters(_config_0);
154
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
155
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
156
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
157
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
158
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
159
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
160
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
161
+ super(_config_8);
162
+ this.config = _config_8;
163
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
164
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
165
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
166
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
167
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
168
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
169
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
170
+ }
171
+ /**
172
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
173
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
174
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
175
+ */
176
+ destroy() {
177
+ super.destroy();
178
+ }
179
+ };
180
+ __name(_PaymentCryptographyDataClient, "PaymentCryptographyDataClient");
181
+ var PaymentCryptographyDataClient = _PaymentCryptographyDataClient;
182
+
183
+ // src/PaymentCryptographyData.ts
184
+
185
+
186
+ // src/commands/DecryptDataCommand.ts
187
+
188
+ var import_middleware_serde = require("@smithy/middleware-serde");
189
+
190
+ var import_types = require("@smithy/types");
191
+
192
+ // src/models/models_0.ts
193
+
194
+
195
+ // src/models/PaymentCryptographyDataServiceException.ts
196
+
197
+ var _PaymentCryptographyDataServiceException = class _PaymentCryptographyDataServiceException extends import_smithy_client.ServiceException {
198
+ /**
199
+ * @internal
200
+ */
201
+ constructor(options) {
202
+ super(options);
203
+ Object.setPrototypeOf(this, _PaymentCryptographyDataServiceException.prototype);
204
+ }
205
+ };
206
+ __name(_PaymentCryptographyDataServiceException, "PaymentCryptographyDataServiceException");
207
+ var PaymentCryptographyDataServiceException = _PaymentCryptographyDataServiceException;
208
+
209
+ // src/models/models_0.ts
210
+ var _AccessDeniedException = class _AccessDeniedException extends PaymentCryptographyDataServiceException {
211
+ /**
212
+ * @internal
213
+ */
214
+ constructor(opts) {
215
+ super({
216
+ name: "AccessDeniedException",
217
+ $fault: "client",
218
+ ...opts
219
+ });
220
+ this.name = "AccessDeniedException";
221
+ this.$fault = "client";
222
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
223
+ this.Message = opts.Message;
224
+ }
225
+ };
226
+ __name(_AccessDeniedException, "AccessDeniedException");
227
+ var AccessDeniedException = _AccessDeniedException;
228
+ var PaddingType = {
229
+ OAEP_SHA1: "OAEP_SHA1",
230
+ OAEP_SHA256: "OAEP_SHA256",
231
+ OAEP_SHA512: "OAEP_SHA512",
232
+ PKCS1: "PKCS1"
233
+ };
234
+ var CardGenerationAttributes;
235
+ ((CardGenerationAttributes3) => {
236
+ CardGenerationAttributes3.visit = /* @__PURE__ */ __name((value, visitor) => {
237
+ if (value.AmexCardSecurityCodeVersion1 !== void 0)
238
+ return visitor.AmexCardSecurityCodeVersion1(value.AmexCardSecurityCodeVersion1);
239
+ if (value.AmexCardSecurityCodeVersion2 !== void 0)
240
+ return visitor.AmexCardSecurityCodeVersion2(value.AmexCardSecurityCodeVersion2);
241
+ if (value.CardVerificationValue1 !== void 0)
242
+ return visitor.CardVerificationValue1(value.CardVerificationValue1);
243
+ if (value.CardVerificationValue2 !== void 0)
244
+ return visitor.CardVerificationValue2(value.CardVerificationValue2);
245
+ if (value.CardHolderVerificationValue !== void 0)
246
+ return visitor.CardHolderVerificationValue(value.CardHolderVerificationValue);
247
+ if (value.DynamicCardVerificationCode !== void 0)
248
+ return visitor.DynamicCardVerificationCode(value.DynamicCardVerificationCode);
249
+ if (value.DynamicCardVerificationValue !== void 0)
250
+ return visitor.DynamicCardVerificationValue(value.DynamicCardVerificationValue);
251
+ return visitor._(value.$unknown[0], value.$unknown[1]);
252
+ }, "visit");
253
+ })(CardGenerationAttributes || (CardGenerationAttributes = {}));
254
+ var CardVerificationAttributes;
255
+ ((CardVerificationAttributes3) => {
256
+ CardVerificationAttributes3.visit = /* @__PURE__ */ __name((value, visitor) => {
257
+ if (value.AmexCardSecurityCodeVersion1 !== void 0)
258
+ return visitor.AmexCardSecurityCodeVersion1(value.AmexCardSecurityCodeVersion1);
259
+ if (value.AmexCardSecurityCodeVersion2 !== void 0)
260
+ return visitor.AmexCardSecurityCodeVersion2(value.AmexCardSecurityCodeVersion2);
261
+ if (value.CardVerificationValue1 !== void 0)
262
+ return visitor.CardVerificationValue1(value.CardVerificationValue1);
263
+ if (value.CardVerificationValue2 !== void 0)
264
+ return visitor.CardVerificationValue2(value.CardVerificationValue2);
265
+ if (value.CardHolderVerificationValue !== void 0)
266
+ return visitor.CardHolderVerificationValue(value.CardHolderVerificationValue);
267
+ if (value.DynamicCardVerificationCode !== void 0)
268
+ return visitor.DynamicCardVerificationCode(value.DynamicCardVerificationCode);
269
+ if (value.DynamicCardVerificationValue !== void 0)
270
+ return visitor.DynamicCardVerificationValue(value.DynamicCardVerificationValue);
271
+ if (value.DiscoverDynamicCardVerificationCode !== void 0)
272
+ return visitor.DiscoverDynamicCardVerificationCode(value.DiscoverDynamicCardVerificationCode);
273
+ return visitor._(value.$unknown[0], value.$unknown[1]);
274
+ }, "visit");
275
+ })(CardVerificationAttributes || (CardVerificationAttributes = {}));
276
+ var CryptogramAuthResponse;
277
+ ((CryptogramAuthResponse3) => {
278
+ CryptogramAuthResponse3.visit = /* @__PURE__ */ __name((value, visitor) => {
279
+ if (value.ArpcMethod1 !== void 0)
280
+ return visitor.ArpcMethod1(value.ArpcMethod1);
281
+ if (value.ArpcMethod2 !== void 0)
282
+ return visitor.ArpcMethod2(value.ArpcMethod2);
283
+ return visitor._(value.$unknown[0], value.$unknown[1]);
284
+ }, "visit");
285
+ })(CryptogramAuthResponse || (CryptogramAuthResponse = {}));
286
+ var DukptDerivationType = {
287
+ AES_128: "AES_128",
288
+ AES_192: "AES_192",
289
+ AES_256: "AES_256",
290
+ TDES_2KEY: "TDES_2KEY",
291
+ TDES_3KEY: "TDES_3KEY"
292
+ };
293
+ var DukptKeyVariant = {
294
+ BIDIRECTIONAL: "BIDIRECTIONAL",
295
+ REQUEST: "REQUEST",
296
+ RESPONSE: "RESPONSE"
297
+ };
298
+ var DukptEncryptionMode = {
299
+ CBC: "CBC",
300
+ ECB: "ECB"
301
+ };
302
+ var EncryptionMode = {
303
+ CBC: "CBC",
304
+ CFB: "CFB",
305
+ CFB1: "CFB1",
306
+ CFB128: "CFB128",
307
+ CFB64: "CFB64",
308
+ CFB8: "CFB8",
309
+ ECB: "ECB",
310
+ OFB: "OFB"
311
+ };
312
+ var EncryptionDecryptionAttributes;
313
+ ((EncryptionDecryptionAttributes3) => {
314
+ EncryptionDecryptionAttributes3.visit = /* @__PURE__ */ __name((value, visitor) => {
315
+ if (value.Symmetric !== void 0)
316
+ return visitor.Symmetric(value.Symmetric);
317
+ if (value.Asymmetric !== void 0)
318
+ return visitor.Asymmetric(value.Asymmetric);
319
+ if (value.Dukpt !== void 0)
320
+ return visitor.Dukpt(value.Dukpt);
321
+ return visitor._(value.$unknown[0], value.$unknown[1]);
322
+ }, "visit");
323
+ })(EncryptionDecryptionAttributes || (EncryptionDecryptionAttributes = {}));
324
+ var _InternalServerException = class _InternalServerException extends PaymentCryptographyDataServiceException {
325
+ /**
326
+ * @internal
327
+ */
328
+ constructor(opts) {
329
+ super({
330
+ name: "InternalServerException",
331
+ $fault: "server",
332
+ ...opts
333
+ });
334
+ this.name = "InternalServerException";
335
+ this.$fault = "server";
336
+ Object.setPrototypeOf(this, _InternalServerException.prototype);
337
+ this.Message = opts.Message;
338
+ }
339
+ };
340
+ __name(_InternalServerException, "InternalServerException");
341
+ var InternalServerException = _InternalServerException;
342
+ var _ResourceNotFoundException = class _ResourceNotFoundException extends PaymentCryptographyDataServiceException {
343
+ /**
344
+ * @internal
345
+ */
346
+ constructor(opts) {
347
+ super({
348
+ name: "ResourceNotFoundException",
349
+ $fault: "client",
350
+ ...opts
351
+ });
352
+ this.name = "ResourceNotFoundException";
353
+ this.$fault = "client";
354
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
355
+ this.ResourceId = opts.ResourceId;
356
+ }
357
+ };
358
+ __name(_ResourceNotFoundException, "ResourceNotFoundException");
359
+ var ResourceNotFoundException = _ResourceNotFoundException;
360
+ var _ThrottlingException = class _ThrottlingException extends PaymentCryptographyDataServiceException {
361
+ /**
362
+ * @internal
363
+ */
364
+ constructor(opts) {
365
+ super({
366
+ name: "ThrottlingException",
367
+ $fault: "client",
368
+ ...opts
369
+ });
370
+ this.name = "ThrottlingException";
371
+ this.$fault = "client";
372
+ Object.setPrototypeOf(this, _ThrottlingException.prototype);
373
+ this.Message = opts.Message;
374
+ }
375
+ };
376
+ __name(_ThrottlingException, "ThrottlingException");
377
+ var ThrottlingException = _ThrottlingException;
378
+ var _ValidationException = class _ValidationException extends PaymentCryptographyDataServiceException {
379
+ /**
380
+ * @internal
381
+ */
382
+ constructor(opts) {
383
+ super({
384
+ name: "ValidationException",
385
+ $fault: "client",
386
+ ...opts
387
+ });
388
+ this.name = "ValidationException";
389
+ this.$fault = "client";
390
+ Object.setPrototypeOf(this, _ValidationException.prototype);
391
+ this.fieldList = opts.fieldList;
392
+ }
393
+ };
394
+ __name(_ValidationException, "ValidationException");
395
+ var ValidationException = _ValidationException;
396
+ var MacAlgorithm = {
397
+ CMAC: "CMAC",
398
+ HMAC_SHA224: "HMAC_SHA224",
399
+ HMAC_SHA256: "HMAC_SHA256",
400
+ HMAC_SHA384: "HMAC_SHA384",
401
+ HMAC_SHA512: "HMAC_SHA512",
402
+ ISO9797_ALGORITHM1: "ISO9797_ALGORITHM1",
403
+ ISO9797_ALGORITHM3: "ISO9797_ALGORITHM3"
404
+ };
405
+ var MajorKeyDerivationMode = {
406
+ EMV_OPTION_A: "EMV_OPTION_A",
407
+ EMV_OPTION_B: "EMV_OPTION_B"
408
+ };
409
+ var SessionKeyDerivationMode = {
410
+ AMEX: "AMEX",
411
+ EMV2000: "EMV2000",
412
+ EMV_COMMON_SESSION_KEY: "EMV_COMMON_SESSION_KEY",
413
+ MASTERCARD_SESSION_KEY: "MASTERCARD_SESSION_KEY",
414
+ VISA: "VISA"
415
+ };
416
+ var SessionKeyDerivationValue;
417
+ ((SessionKeyDerivationValue3) => {
418
+ SessionKeyDerivationValue3.visit = /* @__PURE__ */ __name((value, visitor) => {
419
+ if (value.ApplicationCryptogram !== void 0)
420
+ return visitor.ApplicationCryptogram(value.ApplicationCryptogram);
421
+ if (value.ApplicationTransactionCounter !== void 0)
422
+ return visitor.ApplicationTransactionCounter(value.ApplicationTransactionCounter);
423
+ return visitor._(value.$unknown[0], value.$unknown[1]);
424
+ }, "visit");
425
+ })(SessionKeyDerivationValue || (SessionKeyDerivationValue = {}));
426
+ var MacAttributes;
427
+ ((MacAttributes3) => {
428
+ MacAttributes3.visit = /* @__PURE__ */ __name((value, visitor) => {
429
+ if (value.Algorithm !== void 0)
430
+ return visitor.Algorithm(value.Algorithm);
431
+ if (value.EmvMac !== void 0)
432
+ return visitor.EmvMac(value.EmvMac);
433
+ if (value.DukptIso9797Algorithm1 !== void 0)
434
+ return visitor.DukptIso9797Algorithm1(value.DukptIso9797Algorithm1);
435
+ if (value.DukptIso9797Algorithm3 !== void 0)
436
+ return visitor.DukptIso9797Algorithm3(value.DukptIso9797Algorithm3);
437
+ if (value.DukptCmac !== void 0)
438
+ return visitor.DukptCmac(value.DukptCmac);
439
+ return visitor._(value.$unknown[0], value.$unknown[1]);
440
+ }, "visit");
441
+ })(MacAttributes || (MacAttributes = {}));
442
+ var PinGenerationAttributes;
443
+ ((PinGenerationAttributes3) => {
444
+ PinGenerationAttributes3.visit = /* @__PURE__ */ __name((value, visitor) => {
445
+ if (value.VisaPin !== void 0)
446
+ return visitor.VisaPin(value.VisaPin);
447
+ if (value.VisaPinVerificationValue !== void 0)
448
+ return visitor.VisaPinVerificationValue(value.VisaPinVerificationValue);
449
+ if (value.Ibm3624PinOffset !== void 0)
450
+ return visitor.Ibm3624PinOffset(value.Ibm3624PinOffset);
451
+ if (value.Ibm3624NaturalPin !== void 0)
452
+ return visitor.Ibm3624NaturalPin(value.Ibm3624NaturalPin);
453
+ if (value.Ibm3624RandomPin !== void 0)
454
+ return visitor.Ibm3624RandomPin(value.Ibm3624RandomPin);
455
+ if (value.Ibm3624PinFromOffset !== void 0)
456
+ return visitor.Ibm3624PinFromOffset(value.Ibm3624PinFromOffset);
457
+ return visitor._(value.$unknown[0], value.$unknown[1]);
458
+ }, "visit");
459
+ })(PinGenerationAttributes || (PinGenerationAttributes = {}));
460
+ var PinBlockFormatForPinData = {
461
+ ISO_FORMAT_0: "ISO_FORMAT_0",
462
+ ISO_FORMAT_3: "ISO_FORMAT_3"
463
+ };
464
+ var PinData;
465
+ ((PinData2) => {
466
+ PinData2.visit = /* @__PURE__ */ __name((value, visitor) => {
467
+ if (value.PinOffset !== void 0)
468
+ return visitor.PinOffset(value.PinOffset);
469
+ if (value.VerificationValue !== void 0)
470
+ return visitor.VerificationValue(value.VerificationValue);
471
+ return visitor._(value.$unknown[0], value.$unknown[1]);
472
+ }, "visit");
473
+ })(PinData || (PinData = {}));
474
+ var ReEncryptionAttributes;
475
+ ((ReEncryptionAttributes3) => {
476
+ ReEncryptionAttributes3.visit = /* @__PURE__ */ __name((value, visitor) => {
477
+ if (value.Symmetric !== void 0)
478
+ return visitor.Symmetric(value.Symmetric);
479
+ if (value.Dukpt !== void 0)
480
+ return visitor.Dukpt(value.Dukpt);
481
+ return visitor._(value.$unknown[0], value.$unknown[1]);
482
+ }, "visit");
483
+ })(ReEncryptionAttributes || (ReEncryptionAttributes = {}));
484
+ var TranslationIsoFormats;
485
+ ((TranslationIsoFormats3) => {
486
+ TranslationIsoFormats3.visit = /* @__PURE__ */ __name((value, visitor) => {
487
+ if (value.IsoFormat0 !== void 0)
488
+ return visitor.IsoFormat0(value.IsoFormat0);
489
+ if (value.IsoFormat1 !== void 0)
490
+ return visitor.IsoFormat1(value.IsoFormat1);
491
+ if (value.IsoFormat3 !== void 0)
492
+ return visitor.IsoFormat3(value.IsoFormat3);
493
+ if (value.IsoFormat4 !== void 0)
494
+ return visitor.IsoFormat4(value.IsoFormat4);
495
+ return visitor._(value.$unknown[0], value.$unknown[1]);
496
+ }, "visit");
497
+ })(TranslationIsoFormats || (TranslationIsoFormats = {}));
498
+ var VerificationFailedReason = {
499
+ INVALID_AUTH_REQUEST_CRYPTOGRAM: "INVALID_AUTH_REQUEST_CRYPTOGRAM",
500
+ INVALID_MAC: "INVALID_MAC",
501
+ INVALID_PIN: "INVALID_PIN",
502
+ INVALID_VALIDATION_DATA: "INVALID_VALIDATION_DATA"
503
+ };
504
+ var _VerificationFailedException = class _VerificationFailedException extends PaymentCryptographyDataServiceException {
505
+ /**
506
+ * @internal
507
+ */
508
+ constructor(opts) {
509
+ super({
510
+ name: "VerificationFailedException",
511
+ $fault: "client",
512
+ ...opts
513
+ });
514
+ this.name = "VerificationFailedException";
515
+ this.$fault = "client";
516
+ Object.setPrototypeOf(this, _VerificationFailedException.prototype);
517
+ this.Reason = opts.Reason;
518
+ this.Message = opts.Message;
519
+ }
520
+ };
521
+ __name(_VerificationFailedException, "VerificationFailedException");
522
+ var VerificationFailedException = _VerificationFailedException;
523
+ var SessionKeyDerivation;
524
+ ((SessionKeyDerivation3) => {
525
+ SessionKeyDerivation3.visit = /* @__PURE__ */ __name((value, visitor) => {
526
+ if (value.EmvCommon !== void 0)
527
+ return visitor.EmvCommon(value.EmvCommon);
528
+ if (value.Mastercard !== void 0)
529
+ return visitor.Mastercard(value.Mastercard);
530
+ if (value.Emv2000 !== void 0)
531
+ return visitor.Emv2000(value.Emv2000);
532
+ if (value.Amex !== void 0)
533
+ return visitor.Amex(value.Amex);
534
+ if (value.Visa !== void 0)
535
+ return visitor.Visa(value.Visa);
536
+ return visitor._(value.$unknown[0], value.$unknown[1]);
537
+ }, "visit");
538
+ })(SessionKeyDerivation || (SessionKeyDerivation = {}));
539
+ var PinVerificationAttributes;
540
+ ((PinVerificationAttributes3) => {
541
+ PinVerificationAttributes3.visit = /* @__PURE__ */ __name((value, visitor) => {
542
+ if (value.VisaPin !== void 0)
543
+ return visitor.VisaPin(value.VisaPin);
544
+ if (value.Ibm3624Pin !== void 0)
545
+ return visitor.Ibm3624Pin(value.Ibm3624Pin);
546
+ return visitor._(value.$unknown[0], value.$unknown[1]);
547
+ }, "visit");
548
+ })(PinVerificationAttributes || (PinVerificationAttributes = {}));
549
+ var DukptEncryptionAttributesFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
550
+ ...obj,
551
+ ...obj.InitializationVector && { InitializationVector: import_smithy_client.SENSITIVE_STRING }
552
+ }), "DukptEncryptionAttributesFilterSensitiveLog");
553
+ var SymmetricEncryptionAttributesFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
554
+ ...obj,
555
+ ...obj.InitializationVector && { InitializationVector: import_smithy_client.SENSITIVE_STRING }
556
+ }), "SymmetricEncryptionAttributesFilterSensitiveLog");
557
+ var EncryptionDecryptionAttributesFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
558
+ if (obj.Symmetric !== void 0)
559
+ return { Symmetric: SymmetricEncryptionAttributesFilterSensitiveLog(obj.Symmetric) };
560
+ if (obj.Asymmetric !== void 0)
561
+ return { Asymmetric: obj.Asymmetric };
562
+ if (obj.Dukpt !== void 0)
563
+ return { Dukpt: DukptEncryptionAttributesFilterSensitiveLog(obj.Dukpt) };
564
+ if (obj.$unknown !== void 0)
565
+ return { [obj.$unknown[0]]: "UNKNOWN" };
566
+ }, "EncryptionDecryptionAttributesFilterSensitiveLog");
567
+ var DecryptDataInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
568
+ ...obj,
569
+ ...obj.CipherText && { CipherText: import_smithy_client.SENSITIVE_STRING },
570
+ ...obj.DecryptionAttributes && {
571
+ DecryptionAttributes: EncryptionDecryptionAttributesFilterSensitiveLog(obj.DecryptionAttributes)
572
+ }
573
+ }), "DecryptDataInputFilterSensitiveLog");
574
+ var DecryptDataOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
575
+ ...obj,
576
+ ...obj.PlainText && { PlainText: import_smithy_client.SENSITIVE_STRING }
577
+ }), "DecryptDataOutputFilterSensitiveLog");
578
+ var EncryptDataInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
579
+ ...obj,
580
+ ...obj.PlainText && { PlainText: import_smithy_client.SENSITIVE_STRING },
581
+ ...obj.EncryptionAttributes && {
582
+ EncryptionAttributes: EncryptionDecryptionAttributesFilterSensitiveLog(obj.EncryptionAttributes)
583
+ }
584
+ }), "EncryptDataInputFilterSensitiveLog");
585
+ var EncryptDataOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
586
+ ...obj,
587
+ ...obj.CipherText && { CipherText: import_smithy_client.SENSITIVE_STRING }
588
+ }), "EncryptDataOutputFilterSensitiveLog");
589
+ var GenerateCardValidationDataInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
590
+ ...obj,
591
+ ...obj.PrimaryAccountNumber && { PrimaryAccountNumber: import_smithy_client.SENSITIVE_STRING },
592
+ ...obj.GenerationAttributes && { GenerationAttributes: obj.GenerationAttributes }
593
+ }), "GenerateCardValidationDataInputFilterSensitiveLog");
594
+ var MacAlgorithmEmvFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
595
+ ...obj,
596
+ ...obj.PrimaryAccountNumber && { PrimaryAccountNumber: import_smithy_client.SENSITIVE_STRING },
597
+ ...obj.SessionKeyDerivationValue && { SessionKeyDerivationValue: obj.SessionKeyDerivationValue }
598
+ }), "MacAlgorithmEmvFilterSensitiveLog");
599
+ var MacAttributesFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
600
+ if (obj.Algorithm !== void 0)
601
+ return { Algorithm: obj.Algorithm };
602
+ if (obj.EmvMac !== void 0)
603
+ return { EmvMac: MacAlgorithmEmvFilterSensitiveLog(obj.EmvMac) };
604
+ if (obj.DukptIso9797Algorithm1 !== void 0)
605
+ return { DukptIso9797Algorithm1: obj.DukptIso9797Algorithm1 };
606
+ if (obj.DukptIso9797Algorithm3 !== void 0)
607
+ return { DukptIso9797Algorithm3: obj.DukptIso9797Algorithm3 };
608
+ if (obj.DukptCmac !== void 0)
609
+ return { DukptCmac: obj.DukptCmac };
610
+ if (obj.$unknown !== void 0)
611
+ return { [obj.$unknown[0]]: "UNKNOWN" };
612
+ }, "MacAttributesFilterSensitiveLog");
613
+ var GenerateMacInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
614
+ ...obj,
615
+ ...obj.MessageData && { MessageData: import_smithy_client.SENSITIVE_STRING },
616
+ ...obj.GenerationAttributes && { GenerationAttributes: MacAttributesFilterSensitiveLog(obj.GenerationAttributes) }
617
+ }), "GenerateMacInputFilterSensitiveLog");
618
+ var GeneratePinDataInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
619
+ ...obj,
620
+ ...obj.GenerationAttributes && { GenerationAttributes: obj.GenerationAttributes },
621
+ ...obj.PrimaryAccountNumber && { PrimaryAccountNumber: import_smithy_client.SENSITIVE_STRING }
622
+ }), "GeneratePinDataInputFilterSensitiveLog");
623
+ var ReEncryptionAttributesFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
624
+ if (obj.Symmetric !== void 0)
625
+ return { Symmetric: SymmetricEncryptionAttributesFilterSensitiveLog(obj.Symmetric) };
626
+ if (obj.Dukpt !== void 0)
627
+ return { Dukpt: DukptEncryptionAttributesFilterSensitiveLog(obj.Dukpt) };
628
+ if (obj.$unknown !== void 0)
629
+ return { [obj.$unknown[0]]: "UNKNOWN" };
630
+ }, "ReEncryptionAttributesFilterSensitiveLog");
631
+ var ReEncryptDataInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
632
+ ...obj,
633
+ ...obj.CipherText && { CipherText: import_smithy_client.SENSITIVE_STRING },
634
+ ...obj.IncomingEncryptionAttributes && {
635
+ IncomingEncryptionAttributes: ReEncryptionAttributesFilterSensitiveLog(obj.IncomingEncryptionAttributes)
636
+ },
637
+ ...obj.OutgoingEncryptionAttributes && {
638
+ OutgoingEncryptionAttributes: ReEncryptionAttributesFilterSensitiveLog(obj.OutgoingEncryptionAttributes)
639
+ }
640
+ }), "ReEncryptDataInputFilterSensitiveLog");
641
+ var ReEncryptDataOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
642
+ ...obj,
643
+ ...obj.CipherText && { CipherText: import_smithy_client.SENSITIVE_STRING }
644
+ }), "ReEncryptDataOutputFilterSensitiveLog");
645
+ var TranslationPinDataIsoFormat034FilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
646
+ ...obj,
647
+ ...obj.PrimaryAccountNumber && { PrimaryAccountNumber: import_smithy_client.SENSITIVE_STRING }
648
+ }), "TranslationPinDataIsoFormat034FilterSensitiveLog");
649
+ var TranslationIsoFormatsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
650
+ if (obj.IsoFormat0 !== void 0)
651
+ return { IsoFormat0: TranslationPinDataIsoFormat034FilterSensitiveLog(obj.IsoFormat0) };
652
+ if (obj.IsoFormat1 !== void 0)
653
+ return { IsoFormat1: obj.IsoFormat1 };
654
+ if (obj.IsoFormat3 !== void 0)
655
+ return { IsoFormat3: TranslationPinDataIsoFormat034FilterSensitiveLog(obj.IsoFormat3) };
656
+ if (obj.IsoFormat4 !== void 0)
657
+ return { IsoFormat4: TranslationPinDataIsoFormat034FilterSensitiveLog(obj.IsoFormat4) };
658
+ if (obj.$unknown !== void 0)
659
+ return { [obj.$unknown[0]]: "UNKNOWN" };
660
+ }, "TranslationIsoFormatsFilterSensitiveLog");
661
+ var TranslatePinDataInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
662
+ ...obj,
663
+ ...obj.IncomingTranslationAttributes && {
664
+ IncomingTranslationAttributes: TranslationIsoFormatsFilterSensitiveLog(obj.IncomingTranslationAttributes)
665
+ },
666
+ ...obj.OutgoingTranslationAttributes && {
667
+ OutgoingTranslationAttributes: TranslationIsoFormatsFilterSensitiveLog(obj.OutgoingTranslationAttributes)
668
+ },
669
+ ...obj.EncryptedPinBlock && { EncryptedPinBlock: import_smithy_client.SENSITIVE_STRING }
670
+ }), "TranslatePinDataInputFilterSensitiveLog");
671
+ var SessionKeyAmexFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
672
+ ...obj,
673
+ ...obj.PrimaryAccountNumber && { PrimaryAccountNumber: import_smithy_client.SENSITIVE_STRING }
674
+ }), "SessionKeyAmexFilterSensitiveLog");
675
+ var SessionKeyEmv2000FilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
676
+ ...obj,
677
+ ...obj.PrimaryAccountNumber && { PrimaryAccountNumber: import_smithy_client.SENSITIVE_STRING }
678
+ }), "SessionKeyEmv2000FilterSensitiveLog");
679
+ var SessionKeyEmvCommonFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
680
+ ...obj,
681
+ ...obj.PrimaryAccountNumber && { PrimaryAccountNumber: import_smithy_client.SENSITIVE_STRING }
682
+ }), "SessionKeyEmvCommonFilterSensitiveLog");
683
+ var SessionKeyMastercardFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
684
+ ...obj,
685
+ ...obj.PrimaryAccountNumber && { PrimaryAccountNumber: import_smithy_client.SENSITIVE_STRING }
686
+ }), "SessionKeyMastercardFilterSensitiveLog");
687
+ var SessionKeyVisaFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
688
+ ...obj,
689
+ ...obj.PrimaryAccountNumber && { PrimaryAccountNumber: import_smithy_client.SENSITIVE_STRING }
690
+ }), "SessionKeyVisaFilterSensitiveLog");
691
+ var SessionKeyDerivationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
692
+ if (obj.EmvCommon !== void 0)
693
+ return { EmvCommon: SessionKeyEmvCommonFilterSensitiveLog(obj.EmvCommon) };
694
+ if (obj.Mastercard !== void 0)
695
+ return { Mastercard: SessionKeyMastercardFilterSensitiveLog(obj.Mastercard) };
696
+ if (obj.Emv2000 !== void 0)
697
+ return { Emv2000: SessionKeyEmv2000FilterSensitiveLog(obj.Emv2000) };
698
+ if (obj.Amex !== void 0)
699
+ return { Amex: SessionKeyAmexFilterSensitiveLog(obj.Amex) };
700
+ if (obj.Visa !== void 0)
701
+ return { Visa: SessionKeyVisaFilterSensitiveLog(obj.Visa) };
702
+ if (obj.$unknown !== void 0)
703
+ return { [obj.$unknown[0]]: "UNKNOWN" };
704
+ }, "SessionKeyDerivationFilterSensitiveLog");
705
+ var VerifyAuthRequestCryptogramInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
706
+ ...obj,
707
+ ...obj.SessionKeyDerivationAttributes && {
708
+ SessionKeyDerivationAttributes: SessionKeyDerivationFilterSensitiveLog(obj.SessionKeyDerivationAttributes)
709
+ },
710
+ ...obj.AuthResponseAttributes && { AuthResponseAttributes: obj.AuthResponseAttributes }
711
+ }), "VerifyAuthRequestCryptogramInputFilterSensitiveLog");
712
+ var VerifyCardValidationDataInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
713
+ ...obj,
714
+ ...obj.PrimaryAccountNumber && { PrimaryAccountNumber: import_smithy_client.SENSITIVE_STRING },
715
+ ...obj.VerificationAttributes && { VerificationAttributes: obj.VerificationAttributes }
716
+ }), "VerifyCardValidationDataInputFilterSensitiveLog");
717
+ var VerifyMacInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
718
+ ...obj,
719
+ ...obj.MessageData && { MessageData: import_smithy_client.SENSITIVE_STRING },
720
+ ...obj.Mac && { Mac: import_smithy_client.SENSITIVE_STRING },
721
+ ...obj.VerificationAttributes && {
722
+ VerificationAttributes: MacAttributesFilterSensitiveLog(obj.VerificationAttributes)
723
+ }
724
+ }), "VerifyMacInputFilterSensitiveLog");
725
+ var VerifyPinDataInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
726
+ ...obj,
727
+ ...obj.VerificationAttributes && { VerificationAttributes: obj.VerificationAttributes },
728
+ ...obj.PrimaryAccountNumber && { PrimaryAccountNumber: import_smithy_client.SENSITIVE_STRING }
729
+ }), "VerifyPinDataInputFilterSensitiveLog");
730
+
731
+ // src/protocols/Aws_restJson1.ts
732
+ var import_core = require("@aws-sdk/core");
733
+ var import_core2 = require("@smithy/core");
734
+
735
+ var se_DecryptDataCommand = /* @__PURE__ */ __name(async (input, context) => {
736
+ const b = (0, import_core2.requestBuilder)(input, context);
737
+ const headers = {
738
+ "content-type": "application/json"
739
+ };
740
+ b.bp("/keys/{KeyIdentifier}/decrypt");
741
+ b.p("KeyIdentifier", () => input.KeyIdentifier, "{KeyIdentifier}", false);
742
+ let body;
743
+ body = JSON.stringify(
744
+ (0, import_smithy_client.take)(input, {
745
+ CipherText: [],
746
+ DecryptionAttributes: (_) => (0, import_smithy_client._json)(_)
747
+ })
748
+ );
749
+ b.m("POST").h(headers).b(body);
750
+ return b.build();
751
+ }, "se_DecryptDataCommand");
752
+ var se_EncryptDataCommand = /* @__PURE__ */ __name(async (input, context) => {
753
+ const b = (0, import_core2.requestBuilder)(input, context);
754
+ const headers = {
755
+ "content-type": "application/json"
756
+ };
757
+ b.bp("/keys/{KeyIdentifier}/encrypt");
758
+ b.p("KeyIdentifier", () => input.KeyIdentifier, "{KeyIdentifier}", false);
759
+ let body;
760
+ body = JSON.stringify(
761
+ (0, import_smithy_client.take)(input, {
762
+ EncryptionAttributes: (_) => (0, import_smithy_client._json)(_),
763
+ PlainText: []
764
+ })
765
+ );
766
+ b.m("POST").h(headers).b(body);
767
+ return b.build();
768
+ }, "se_EncryptDataCommand");
769
+ var se_GenerateCardValidationDataCommand = /* @__PURE__ */ __name(async (input, context) => {
770
+ const b = (0, import_core2.requestBuilder)(input, context);
771
+ const headers = {
772
+ "content-type": "application/json"
773
+ };
774
+ b.bp("/cardvalidationdata/generate");
775
+ let body;
776
+ body = JSON.stringify(
777
+ (0, import_smithy_client.take)(input, {
778
+ GenerationAttributes: (_) => (0, import_smithy_client._json)(_),
779
+ KeyIdentifier: [],
780
+ PrimaryAccountNumber: [],
781
+ ValidationDataLength: []
782
+ })
783
+ );
784
+ b.m("POST").h(headers).b(body);
785
+ return b.build();
786
+ }, "se_GenerateCardValidationDataCommand");
787
+ var se_GenerateMacCommand = /* @__PURE__ */ __name(async (input, context) => {
788
+ const b = (0, import_core2.requestBuilder)(input, context);
789
+ const headers = {
790
+ "content-type": "application/json"
791
+ };
792
+ b.bp("/mac/generate");
793
+ let body;
794
+ body = JSON.stringify(
795
+ (0, import_smithy_client.take)(input, {
796
+ GenerationAttributes: (_) => (0, import_smithy_client._json)(_),
797
+ KeyIdentifier: [],
798
+ MacLength: [],
799
+ MessageData: []
800
+ })
801
+ );
802
+ b.m("POST").h(headers).b(body);
803
+ return b.build();
804
+ }, "se_GenerateMacCommand");
805
+ var se_GeneratePinDataCommand = /* @__PURE__ */ __name(async (input, context) => {
806
+ const b = (0, import_core2.requestBuilder)(input, context);
807
+ const headers = {
808
+ "content-type": "application/json"
809
+ };
810
+ b.bp("/pindata/generate");
811
+ let body;
812
+ body = JSON.stringify(
813
+ (0, import_smithy_client.take)(input, {
814
+ EncryptionKeyIdentifier: [],
815
+ GenerationAttributes: (_) => (0, import_smithy_client._json)(_),
816
+ GenerationKeyIdentifier: [],
817
+ PinBlockFormat: [],
818
+ PinDataLength: [],
819
+ PrimaryAccountNumber: []
820
+ })
821
+ );
822
+ b.m("POST").h(headers).b(body);
823
+ return b.build();
824
+ }, "se_GeneratePinDataCommand");
825
+ var se_ReEncryptDataCommand = /* @__PURE__ */ __name(async (input, context) => {
826
+ const b = (0, import_core2.requestBuilder)(input, context);
827
+ const headers = {
828
+ "content-type": "application/json"
829
+ };
830
+ b.bp("/keys/{IncomingKeyIdentifier}/reencrypt");
831
+ b.p("IncomingKeyIdentifier", () => input.IncomingKeyIdentifier, "{IncomingKeyIdentifier}", false);
832
+ let body;
833
+ body = JSON.stringify(
834
+ (0, import_smithy_client.take)(input, {
835
+ CipherText: [],
836
+ IncomingEncryptionAttributes: (_) => (0, import_smithy_client._json)(_),
837
+ OutgoingEncryptionAttributes: (_) => (0, import_smithy_client._json)(_),
838
+ OutgoingKeyIdentifier: []
839
+ })
840
+ );
841
+ b.m("POST").h(headers).b(body);
842
+ return b.build();
843
+ }, "se_ReEncryptDataCommand");
844
+ var se_TranslatePinDataCommand = /* @__PURE__ */ __name(async (input, context) => {
845
+ const b = (0, import_core2.requestBuilder)(input, context);
846
+ const headers = {
847
+ "content-type": "application/json"
848
+ };
849
+ b.bp("/pindata/translate");
850
+ let body;
851
+ body = JSON.stringify(
852
+ (0, import_smithy_client.take)(input, {
853
+ EncryptedPinBlock: [],
854
+ IncomingDukptAttributes: (_) => (0, import_smithy_client._json)(_),
855
+ IncomingKeyIdentifier: [],
856
+ IncomingTranslationAttributes: (_) => (0, import_smithy_client._json)(_),
857
+ OutgoingDukptAttributes: (_) => (0, import_smithy_client._json)(_),
858
+ OutgoingKeyIdentifier: [],
859
+ OutgoingTranslationAttributes: (_) => (0, import_smithy_client._json)(_)
860
+ })
861
+ );
862
+ b.m("POST").h(headers).b(body);
863
+ return b.build();
864
+ }, "se_TranslatePinDataCommand");
865
+ var se_VerifyAuthRequestCryptogramCommand = /* @__PURE__ */ __name(async (input, context) => {
866
+ const b = (0, import_core2.requestBuilder)(input, context);
867
+ const headers = {
868
+ "content-type": "application/json"
869
+ };
870
+ b.bp("/cryptogram/verify");
871
+ let body;
872
+ body = JSON.stringify(
873
+ (0, import_smithy_client.take)(input, {
874
+ AuthRequestCryptogram: [],
875
+ AuthResponseAttributes: (_) => (0, import_smithy_client._json)(_),
876
+ KeyIdentifier: [],
877
+ MajorKeyDerivationMode: [],
878
+ SessionKeyDerivationAttributes: (_) => (0, import_smithy_client._json)(_),
879
+ TransactionData: []
880
+ })
881
+ );
882
+ b.m("POST").h(headers).b(body);
883
+ return b.build();
884
+ }, "se_VerifyAuthRequestCryptogramCommand");
885
+ var se_VerifyCardValidationDataCommand = /* @__PURE__ */ __name(async (input, context) => {
886
+ const b = (0, import_core2.requestBuilder)(input, context);
887
+ const headers = {
888
+ "content-type": "application/json"
889
+ };
890
+ b.bp("/cardvalidationdata/verify");
891
+ let body;
892
+ body = JSON.stringify(
893
+ (0, import_smithy_client.take)(input, {
894
+ KeyIdentifier: [],
895
+ PrimaryAccountNumber: [],
896
+ ValidationData: [],
897
+ VerificationAttributes: (_) => (0, import_smithy_client._json)(_)
898
+ })
899
+ );
900
+ b.m("POST").h(headers).b(body);
901
+ return b.build();
902
+ }, "se_VerifyCardValidationDataCommand");
903
+ var se_VerifyMacCommand = /* @__PURE__ */ __name(async (input, context) => {
904
+ const b = (0, import_core2.requestBuilder)(input, context);
905
+ const headers = {
906
+ "content-type": "application/json"
907
+ };
908
+ b.bp("/mac/verify");
909
+ let body;
910
+ body = JSON.stringify(
911
+ (0, import_smithy_client.take)(input, {
912
+ KeyIdentifier: [],
913
+ Mac: [],
914
+ MacLength: [],
915
+ MessageData: [],
916
+ VerificationAttributes: (_) => (0, import_smithy_client._json)(_)
917
+ })
918
+ );
919
+ b.m("POST").h(headers).b(body);
920
+ return b.build();
921
+ }, "se_VerifyMacCommand");
922
+ var se_VerifyPinDataCommand = /* @__PURE__ */ __name(async (input, context) => {
923
+ const b = (0, import_core2.requestBuilder)(input, context);
924
+ const headers = {
925
+ "content-type": "application/json"
926
+ };
927
+ b.bp("/pindata/verify");
928
+ let body;
929
+ body = JSON.stringify(
930
+ (0, import_smithy_client.take)(input, {
931
+ DukptAttributes: (_) => (0, import_smithy_client._json)(_),
932
+ EncryptedPinBlock: [],
933
+ EncryptionKeyIdentifier: [],
934
+ PinBlockFormat: [],
935
+ PinDataLength: [],
936
+ PrimaryAccountNumber: [],
937
+ VerificationAttributes: (_) => (0, import_smithy_client._json)(_),
938
+ VerificationKeyIdentifier: []
939
+ })
940
+ );
941
+ b.m("POST").h(headers).b(body);
942
+ return b.build();
943
+ }, "se_VerifyPinDataCommand");
944
+ var de_DecryptDataCommand = /* @__PURE__ */ __name(async (output, context) => {
945
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
946
+ return de_DecryptDataCommandError(output, context);
947
+ }
948
+ const contents = (0, import_smithy_client.map)({
949
+ $metadata: deserializeMetadata(output)
950
+ });
951
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
952
+ const doc = (0, import_smithy_client.take)(data, {
953
+ KeyArn: import_smithy_client.expectString,
954
+ KeyCheckValue: import_smithy_client.expectString,
955
+ PlainText: import_smithy_client.expectString
956
+ });
957
+ Object.assign(contents, doc);
958
+ return contents;
959
+ }, "de_DecryptDataCommand");
960
+ var de_DecryptDataCommandError = /* @__PURE__ */ __name(async (output, context) => {
961
+ const parsedOutput = {
962
+ ...output,
963
+ body: await parseErrorBody(output.body, context)
964
+ };
965
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
966
+ switch (errorCode) {
967
+ case "AccessDeniedException":
968
+ case "com.amazonaws.paymentcryptographydata#AccessDeniedException":
969
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
970
+ case "InternalServerException":
971
+ case "com.amazonaws.paymentcryptographydata#InternalServerException":
972
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
973
+ case "ResourceNotFoundException":
974
+ case "com.amazonaws.paymentcryptographydata#ResourceNotFoundException":
975
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
976
+ case "ThrottlingException":
977
+ case "com.amazonaws.paymentcryptographydata#ThrottlingException":
978
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
979
+ case "ValidationException":
980
+ case "com.amazonaws.paymentcryptographydata#ValidationException":
981
+ throw await de_ValidationExceptionRes(parsedOutput, context);
982
+ default:
983
+ const parsedBody = parsedOutput.body;
984
+ return throwDefaultError({
985
+ output,
986
+ parsedBody,
987
+ errorCode
988
+ });
989
+ }
990
+ }, "de_DecryptDataCommandError");
991
+ var de_EncryptDataCommand = /* @__PURE__ */ __name(async (output, context) => {
992
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
993
+ return de_EncryptDataCommandError(output, context);
994
+ }
995
+ const contents = (0, import_smithy_client.map)({
996
+ $metadata: deserializeMetadata(output)
997
+ });
998
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
999
+ const doc = (0, import_smithy_client.take)(data, {
1000
+ CipherText: import_smithy_client.expectString,
1001
+ KeyArn: import_smithy_client.expectString,
1002
+ KeyCheckValue: import_smithy_client.expectString
1003
+ });
1004
+ Object.assign(contents, doc);
1005
+ return contents;
1006
+ }, "de_EncryptDataCommand");
1007
+ var de_EncryptDataCommandError = /* @__PURE__ */ __name(async (output, context) => {
1008
+ const parsedOutput = {
1009
+ ...output,
1010
+ body: await parseErrorBody(output.body, context)
1011
+ };
1012
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1013
+ switch (errorCode) {
1014
+ case "AccessDeniedException":
1015
+ case "com.amazonaws.paymentcryptographydata#AccessDeniedException":
1016
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1017
+ case "InternalServerException":
1018
+ case "com.amazonaws.paymentcryptographydata#InternalServerException":
1019
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1020
+ case "ResourceNotFoundException":
1021
+ case "com.amazonaws.paymentcryptographydata#ResourceNotFoundException":
1022
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1023
+ case "ThrottlingException":
1024
+ case "com.amazonaws.paymentcryptographydata#ThrottlingException":
1025
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1026
+ case "ValidationException":
1027
+ case "com.amazonaws.paymentcryptographydata#ValidationException":
1028
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1029
+ default:
1030
+ const parsedBody = parsedOutput.body;
1031
+ return throwDefaultError({
1032
+ output,
1033
+ parsedBody,
1034
+ errorCode
1035
+ });
1036
+ }
1037
+ }, "de_EncryptDataCommandError");
1038
+ var de_GenerateCardValidationDataCommand = /* @__PURE__ */ __name(async (output, context) => {
1039
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1040
+ return de_GenerateCardValidationDataCommandError(output, context);
1041
+ }
1042
+ const contents = (0, import_smithy_client.map)({
1043
+ $metadata: deserializeMetadata(output)
1044
+ });
1045
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1046
+ const doc = (0, import_smithy_client.take)(data, {
1047
+ KeyArn: import_smithy_client.expectString,
1048
+ KeyCheckValue: import_smithy_client.expectString,
1049
+ ValidationData: import_smithy_client.expectString
1050
+ });
1051
+ Object.assign(contents, doc);
1052
+ return contents;
1053
+ }, "de_GenerateCardValidationDataCommand");
1054
+ var de_GenerateCardValidationDataCommandError = /* @__PURE__ */ __name(async (output, context) => {
1055
+ const parsedOutput = {
1056
+ ...output,
1057
+ body: await parseErrorBody(output.body, context)
1058
+ };
1059
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1060
+ switch (errorCode) {
1061
+ case "AccessDeniedException":
1062
+ case "com.amazonaws.paymentcryptographydata#AccessDeniedException":
1063
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1064
+ case "InternalServerException":
1065
+ case "com.amazonaws.paymentcryptographydata#InternalServerException":
1066
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1067
+ case "ResourceNotFoundException":
1068
+ case "com.amazonaws.paymentcryptographydata#ResourceNotFoundException":
1069
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1070
+ case "ThrottlingException":
1071
+ case "com.amazonaws.paymentcryptographydata#ThrottlingException":
1072
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1073
+ case "ValidationException":
1074
+ case "com.amazonaws.paymentcryptographydata#ValidationException":
1075
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1076
+ default:
1077
+ const parsedBody = parsedOutput.body;
1078
+ return throwDefaultError({
1079
+ output,
1080
+ parsedBody,
1081
+ errorCode
1082
+ });
1083
+ }
1084
+ }, "de_GenerateCardValidationDataCommandError");
1085
+ var de_GenerateMacCommand = /* @__PURE__ */ __name(async (output, context) => {
1086
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1087
+ return de_GenerateMacCommandError(output, context);
1088
+ }
1089
+ const contents = (0, import_smithy_client.map)({
1090
+ $metadata: deserializeMetadata(output)
1091
+ });
1092
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1093
+ const doc = (0, import_smithy_client.take)(data, {
1094
+ KeyArn: import_smithy_client.expectString,
1095
+ KeyCheckValue: import_smithy_client.expectString,
1096
+ Mac: import_smithy_client.expectString
1097
+ });
1098
+ Object.assign(contents, doc);
1099
+ return contents;
1100
+ }, "de_GenerateMacCommand");
1101
+ var de_GenerateMacCommandError = /* @__PURE__ */ __name(async (output, context) => {
1102
+ const parsedOutput = {
1103
+ ...output,
1104
+ body: await parseErrorBody(output.body, context)
1105
+ };
1106
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1107
+ switch (errorCode) {
1108
+ case "AccessDeniedException":
1109
+ case "com.amazonaws.paymentcryptographydata#AccessDeniedException":
1110
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1111
+ case "InternalServerException":
1112
+ case "com.amazonaws.paymentcryptographydata#InternalServerException":
1113
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1114
+ case "ResourceNotFoundException":
1115
+ case "com.amazonaws.paymentcryptographydata#ResourceNotFoundException":
1116
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1117
+ case "ThrottlingException":
1118
+ case "com.amazonaws.paymentcryptographydata#ThrottlingException":
1119
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1120
+ case "ValidationException":
1121
+ case "com.amazonaws.paymentcryptographydata#ValidationException":
1122
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1123
+ default:
1124
+ const parsedBody = parsedOutput.body;
1125
+ return throwDefaultError({
1126
+ output,
1127
+ parsedBody,
1128
+ errorCode
1129
+ });
1130
+ }
1131
+ }, "de_GenerateMacCommandError");
1132
+ var de_GeneratePinDataCommand = /* @__PURE__ */ __name(async (output, context) => {
1133
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1134
+ return de_GeneratePinDataCommandError(output, context);
1135
+ }
1136
+ const contents = (0, import_smithy_client.map)({
1137
+ $metadata: deserializeMetadata(output)
1138
+ });
1139
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1140
+ const doc = (0, import_smithy_client.take)(data, {
1141
+ EncryptedPinBlock: import_smithy_client.expectString,
1142
+ EncryptionKeyArn: import_smithy_client.expectString,
1143
+ EncryptionKeyCheckValue: import_smithy_client.expectString,
1144
+ GenerationKeyArn: import_smithy_client.expectString,
1145
+ GenerationKeyCheckValue: import_smithy_client.expectString,
1146
+ PinData: (_) => (0, import_smithy_client._json)((0, import_core.awsExpectUnion)(_))
1147
+ });
1148
+ Object.assign(contents, doc);
1149
+ return contents;
1150
+ }, "de_GeneratePinDataCommand");
1151
+ var de_GeneratePinDataCommandError = /* @__PURE__ */ __name(async (output, context) => {
1152
+ const parsedOutput = {
1153
+ ...output,
1154
+ body: await parseErrorBody(output.body, context)
1155
+ };
1156
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1157
+ switch (errorCode) {
1158
+ case "AccessDeniedException":
1159
+ case "com.amazonaws.paymentcryptographydata#AccessDeniedException":
1160
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1161
+ case "InternalServerException":
1162
+ case "com.amazonaws.paymentcryptographydata#InternalServerException":
1163
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1164
+ case "ResourceNotFoundException":
1165
+ case "com.amazonaws.paymentcryptographydata#ResourceNotFoundException":
1166
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1167
+ case "ThrottlingException":
1168
+ case "com.amazonaws.paymentcryptographydata#ThrottlingException":
1169
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1170
+ case "ValidationException":
1171
+ case "com.amazonaws.paymentcryptographydata#ValidationException":
1172
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1173
+ default:
1174
+ const parsedBody = parsedOutput.body;
1175
+ return throwDefaultError({
1176
+ output,
1177
+ parsedBody,
1178
+ errorCode
1179
+ });
1180
+ }
1181
+ }, "de_GeneratePinDataCommandError");
1182
+ var de_ReEncryptDataCommand = /* @__PURE__ */ __name(async (output, context) => {
1183
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1184
+ return de_ReEncryptDataCommandError(output, context);
1185
+ }
1186
+ const contents = (0, import_smithy_client.map)({
1187
+ $metadata: deserializeMetadata(output)
1188
+ });
1189
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1190
+ const doc = (0, import_smithy_client.take)(data, {
1191
+ CipherText: import_smithy_client.expectString,
1192
+ KeyArn: import_smithy_client.expectString,
1193
+ KeyCheckValue: import_smithy_client.expectString
1194
+ });
1195
+ Object.assign(contents, doc);
1196
+ return contents;
1197
+ }, "de_ReEncryptDataCommand");
1198
+ var de_ReEncryptDataCommandError = /* @__PURE__ */ __name(async (output, context) => {
1199
+ const parsedOutput = {
1200
+ ...output,
1201
+ body: await parseErrorBody(output.body, context)
1202
+ };
1203
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1204
+ switch (errorCode) {
1205
+ case "AccessDeniedException":
1206
+ case "com.amazonaws.paymentcryptographydata#AccessDeniedException":
1207
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1208
+ case "InternalServerException":
1209
+ case "com.amazonaws.paymentcryptographydata#InternalServerException":
1210
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1211
+ case "ResourceNotFoundException":
1212
+ case "com.amazonaws.paymentcryptographydata#ResourceNotFoundException":
1213
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1214
+ case "ThrottlingException":
1215
+ case "com.amazonaws.paymentcryptographydata#ThrottlingException":
1216
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1217
+ case "ValidationException":
1218
+ case "com.amazonaws.paymentcryptographydata#ValidationException":
1219
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1220
+ default:
1221
+ const parsedBody = parsedOutput.body;
1222
+ return throwDefaultError({
1223
+ output,
1224
+ parsedBody,
1225
+ errorCode
1226
+ });
1227
+ }
1228
+ }, "de_ReEncryptDataCommandError");
1229
+ var de_TranslatePinDataCommand = /* @__PURE__ */ __name(async (output, context) => {
1230
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1231
+ return de_TranslatePinDataCommandError(output, context);
1232
+ }
1233
+ const contents = (0, import_smithy_client.map)({
1234
+ $metadata: deserializeMetadata(output)
1235
+ });
1236
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1237
+ const doc = (0, import_smithy_client.take)(data, {
1238
+ KeyArn: import_smithy_client.expectString,
1239
+ KeyCheckValue: import_smithy_client.expectString,
1240
+ PinBlock: import_smithy_client.expectString
1241
+ });
1242
+ Object.assign(contents, doc);
1243
+ return contents;
1244
+ }, "de_TranslatePinDataCommand");
1245
+ var de_TranslatePinDataCommandError = /* @__PURE__ */ __name(async (output, context) => {
1246
+ const parsedOutput = {
1247
+ ...output,
1248
+ body: await parseErrorBody(output.body, context)
1249
+ };
1250
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1251
+ switch (errorCode) {
1252
+ case "AccessDeniedException":
1253
+ case "com.amazonaws.paymentcryptographydata#AccessDeniedException":
1254
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1255
+ case "InternalServerException":
1256
+ case "com.amazonaws.paymentcryptographydata#InternalServerException":
1257
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1258
+ case "ResourceNotFoundException":
1259
+ case "com.amazonaws.paymentcryptographydata#ResourceNotFoundException":
1260
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1261
+ case "ThrottlingException":
1262
+ case "com.amazonaws.paymentcryptographydata#ThrottlingException":
1263
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1264
+ case "ValidationException":
1265
+ case "com.amazonaws.paymentcryptographydata#ValidationException":
1266
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1267
+ default:
1268
+ const parsedBody = parsedOutput.body;
1269
+ return throwDefaultError({
1270
+ output,
1271
+ parsedBody,
1272
+ errorCode
1273
+ });
1274
+ }
1275
+ }, "de_TranslatePinDataCommandError");
1276
+ var de_VerifyAuthRequestCryptogramCommand = /* @__PURE__ */ __name(async (output, context) => {
1277
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1278
+ return de_VerifyAuthRequestCryptogramCommandError(output, context);
1279
+ }
1280
+ const contents = (0, import_smithy_client.map)({
1281
+ $metadata: deserializeMetadata(output)
1282
+ });
1283
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1284
+ const doc = (0, import_smithy_client.take)(data, {
1285
+ AuthResponseValue: import_smithy_client.expectString,
1286
+ KeyArn: import_smithy_client.expectString,
1287
+ KeyCheckValue: import_smithy_client.expectString
1288
+ });
1289
+ Object.assign(contents, doc);
1290
+ return contents;
1291
+ }, "de_VerifyAuthRequestCryptogramCommand");
1292
+ var de_VerifyAuthRequestCryptogramCommandError = /* @__PURE__ */ __name(async (output, context) => {
1293
+ const parsedOutput = {
1294
+ ...output,
1295
+ body: await parseErrorBody(output.body, context)
1296
+ };
1297
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1298
+ switch (errorCode) {
1299
+ case "AccessDeniedException":
1300
+ case "com.amazonaws.paymentcryptographydata#AccessDeniedException":
1301
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1302
+ case "InternalServerException":
1303
+ case "com.amazonaws.paymentcryptographydata#InternalServerException":
1304
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1305
+ case "ResourceNotFoundException":
1306
+ case "com.amazonaws.paymentcryptographydata#ResourceNotFoundException":
1307
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1308
+ case "ThrottlingException":
1309
+ case "com.amazonaws.paymentcryptographydata#ThrottlingException":
1310
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1311
+ case "ValidationException":
1312
+ case "com.amazonaws.paymentcryptographydata#ValidationException":
1313
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1314
+ case "VerificationFailedException":
1315
+ case "com.amazonaws.paymentcryptographydata#VerificationFailedException":
1316
+ throw await de_VerificationFailedExceptionRes(parsedOutput, context);
1317
+ default:
1318
+ const parsedBody = parsedOutput.body;
1319
+ return throwDefaultError({
1320
+ output,
1321
+ parsedBody,
1322
+ errorCode
1323
+ });
1324
+ }
1325
+ }, "de_VerifyAuthRequestCryptogramCommandError");
1326
+ var de_VerifyCardValidationDataCommand = /* @__PURE__ */ __name(async (output, context) => {
1327
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1328
+ return de_VerifyCardValidationDataCommandError(output, context);
1329
+ }
1330
+ const contents = (0, import_smithy_client.map)({
1331
+ $metadata: deserializeMetadata(output)
1332
+ });
1333
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1334
+ const doc = (0, import_smithy_client.take)(data, {
1335
+ KeyArn: import_smithy_client.expectString,
1336
+ KeyCheckValue: import_smithy_client.expectString
1337
+ });
1338
+ Object.assign(contents, doc);
1339
+ return contents;
1340
+ }, "de_VerifyCardValidationDataCommand");
1341
+ var de_VerifyCardValidationDataCommandError = /* @__PURE__ */ __name(async (output, context) => {
1342
+ const parsedOutput = {
1343
+ ...output,
1344
+ body: await parseErrorBody(output.body, context)
1345
+ };
1346
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1347
+ switch (errorCode) {
1348
+ case "AccessDeniedException":
1349
+ case "com.amazonaws.paymentcryptographydata#AccessDeniedException":
1350
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1351
+ case "InternalServerException":
1352
+ case "com.amazonaws.paymentcryptographydata#InternalServerException":
1353
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1354
+ case "ResourceNotFoundException":
1355
+ case "com.amazonaws.paymentcryptographydata#ResourceNotFoundException":
1356
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1357
+ case "ThrottlingException":
1358
+ case "com.amazonaws.paymentcryptographydata#ThrottlingException":
1359
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1360
+ case "ValidationException":
1361
+ case "com.amazonaws.paymentcryptographydata#ValidationException":
1362
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1363
+ case "VerificationFailedException":
1364
+ case "com.amazonaws.paymentcryptographydata#VerificationFailedException":
1365
+ throw await de_VerificationFailedExceptionRes(parsedOutput, context);
1366
+ default:
1367
+ const parsedBody = parsedOutput.body;
1368
+ return throwDefaultError({
1369
+ output,
1370
+ parsedBody,
1371
+ errorCode
1372
+ });
1373
+ }
1374
+ }, "de_VerifyCardValidationDataCommandError");
1375
+ var de_VerifyMacCommand = /* @__PURE__ */ __name(async (output, context) => {
1376
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1377
+ return de_VerifyMacCommandError(output, context);
1378
+ }
1379
+ const contents = (0, import_smithy_client.map)({
1380
+ $metadata: deserializeMetadata(output)
1381
+ });
1382
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1383
+ const doc = (0, import_smithy_client.take)(data, {
1384
+ KeyArn: import_smithy_client.expectString,
1385
+ KeyCheckValue: import_smithy_client.expectString
1386
+ });
1387
+ Object.assign(contents, doc);
1388
+ return contents;
1389
+ }, "de_VerifyMacCommand");
1390
+ var de_VerifyMacCommandError = /* @__PURE__ */ __name(async (output, context) => {
1391
+ const parsedOutput = {
1392
+ ...output,
1393
+ body: await parseErrorBody(output.body, context)
1394
+ };
1395
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1396
+ switch (errorCode) {
1397
+ case "AccessDeniedException":
1398
+ case "com.amazonaws.paymentcryptographydata#AccessDeniedException":
1399
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1400
+ case "InternalServerException":
1401
+ case "com.amazonaws.paymentcryptographydata#InternalServerException":
1402
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1403
+ case "ResourceNotFoundException":
1404
+ case "com.amazonaws.paymentcryptographydata#ResourceNotFoundException":
1405
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1406
+ case "ThrottlingException":
1407
+ case "com.amazonaws.paymentcryptographydata#ThrottlingException":
1408
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1409
+ case "ValidationException":
1410
+ case "com.amazonaws.paymentcryptographydata#ValidationException":
1411
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1412
+ case "VerificationFailedException":
1413
+ case "com.amazonaws.paymentcryptographydata#VerificationFailedException":
1414
+ throw await de_VerificationFailedExceptionRes(parsedOutput, context);
1415
+ default:
1416
+ const parsedBody = parsedOutput.body;
1417
+ return throwDefaultError({
1418
+ output,
1419
+ parsedBody,
1420
+ errorCode
1421
+ });
1422
+ }
1423
+ }, "de_VerifyMacCommandError");
1424
+ var de_VerifyPinDataCommand = /* @__PURE__ */ __name(async (output, context) => {
1425
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1426
+ return de_VerifyPinDataCommandError(output, context);
1427
+ }
1428
+ const contents = (0, import_smithy_client.map)({
1429
+ $metadata: deserializeMetadata(output)
1430
+ });
1431
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1432
+ const doc = (0, import_smithy_client.take)(data, {
1433
+ EncryptionKeyArn: import_smithy_client.expectString,
1434
+ EncryptionKeyCheckValue: import_smithy_client.expectString,
1435
+ VerificationKeyArn: import_smithy_client.expectString,
1436
+ VerificationKeyCheckValue: import_smithy_client.expectString
1437
+ });
1438
+ Object.assign(contents, doc);
1439
+ return contents;
1440
+ }, "de_VerifyPinDataCommand");
1441
+ var de_VerifyPinDataCommandError = /* @__PURE__ */ __name(async (output, context) => {
1442
+ const parsedOutput = {
1443
+ ...output,
1444
+ body: await parseErrorBody(output.body, context)
1445
+ };
1446
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1447
+ switch (errorCode) {
1448
+ case "AccessDeniedException":
1449
+ case "com.amazonaws.paymentcryptographydata#AccessDeniedException":
1450
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1451
+ case "InternalServerException":
1452
+ case "com.amazonaws.paymentcryptographydata#InternalServerException":
1453
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1454
+ case "ResourceNotFoundException":
1455
+ case "com.amazonaws.paymentcryptographydata#ResourceNotFoundException":
1456
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1457
+ case "ThrottlingException":
1458
+ case "com.amazonaws.paymentcryptographydata#ThrottlingException":
1459
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1460
+ case "ValidationException":
1461
+ case "com.amazonaws.paymentcryptographydata#ValidationException":
1462
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1463
+ case "VerificationFailedException":
1464
+ case "com.amazonaws.paymentcryptographydata#VerificationFailedException":
1465
+ throw await de_VerificationFailedExceptionRes(parsedOutput, context);
1466
+ default:
1467
+ const parsedBody = parsedOutput.body;
1468
+ return throwDefaultError({
1469
+ output,
1470
+ parsedBody,
1471
+ errorCode
1472
+ });
1473
+ }
1474
+ }, "de_VerifyPinDataCommandError");
1475
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(PaymentCryptographyDataServiceException);
1476
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1477
+ const contents = (0, import_smithy_client.map)({});
1478
+ const data = parsedOutput.body;
1479
+ const doc = (0, import_smithy_client.take)(data, {
1480
+ Message: import_smithy_client.expectString
1481
+ });
1482
+ Object.assign(contents, doc);
1483
+ const exception = new AccessDeniedException({
1484
+ $metadata: deserializeMetadata(parsedOutput),
1485
+ ...contents
1486
+ });
1487
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1488
+ }, "de_AccessDeniedExceptionRes");
1489
+ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1490
+ const contents = (0, import_smithy_client.map)({});
1491
+ const data = parsedOutput.body;
1492
+ const doc = (0, import_smithy_client.take)(data, {
1493
+ Message: import_smithy_client.expectString
1494
+ });
1495
+ Object.assign(contents, doc);
1496
+ const exception = new InternalServerException({
1497
+ $metadata: deserializeMetadata(parsedOutput),
1498
+ ...contents
1499
+ });
1500
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1501
+ }, "de_InternalServerExceptionRes");
1502
+ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1503
+ const contents = (0, import_smithy_client.map)({});
1504
+ const data = parsedOutput.body;
1505
+ const doc = (0, import_smithy_client.take)(data, {
1506
+ ResourceId: import_smithy_client.expectString
1507
+ });
1508
+ Object.assign(contents, doc);
1509
+ const exception = new ResourceNotFoundException({
1510
+ $metadata: deserializeMetadata(parsedOutput),
1511
+ ...contents
1512
+ });
1513
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1514
+ }, "de_ResourceNotFoundExceptionRes");
1515
+ var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1516
+ const contents = (0, import_smithy_client.map)({});
1517
+ const data = parsedOutput.body;
1518
+ const doc = (0, import_smithy_client.take)(data, {
1519
+ Message: import_smithy_client.expectString
1520
+ });
1521
+ Object.assign(contents, doc);
1522
+ const exception = new ThrottlingException({
1523
+ $metadata: deserializeMetadata(parsedOutput),
1524
+ ...contents
1525
+ });
1526
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1527
+ }, "de_ThrottlingExceptionRes");
1528
+ var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1529
+ const contents = (0, import_smithy_client.map)({});
1530
+ const data = parsedOutput.body;
1531
+ const doc = (0, import_smithy_client.take)(data, {
1532
+ fieldList: import_smithy_client._json,
1533
+ message: import_smithy_client.expectString
1534
+ });
1535
+ Object.assign(contents, doc);
1536
+ const exception = new ValidationException({
1537
+ $metadata: deserializeMetadata(parsedOutput),
1538
+ ...contents
1539
+ });
1540
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1541
+ }, "de_ValidationExceptionRes");
1542
+ var de_VerificationFailedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1543
+ const contents = (0, import_smithy_client.map)({});
1544
+ const data = parsedOutput.body;
1545
+ const doc = (0, import_smithy_client.take)(data, {
1546
+ Message: import_smithy_client.expectString,
1547
+ Reason: import_smithy_client.expectString
1548
+ });
1549
+ Object.assign(contents, doc);
1550
+ const exception = new VerificationFailedException({
1551
+ $metadata: deserializeMetadata(parsedOutput),
1552
+ ...contents
1553
+ });
1554
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1555
+ }, "de_VerificationFailedExceptionRes");
1556
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
1557
+ httpStatusCode: output.statusCode,
1558
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1559
+ extendedRequestId: output.headers["x-amz-id-2"],
1560
+ cfId: output.headers["x-amz-cf-id"]
1561
+ }), "deserializeMetadata");
1562
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
1563
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1564
+ if (encoded.length) {
1565
+ return JSON.parse(encoded);
1566
+ }
1567
+ return {};
1568
+ }), "parseBody");
1569
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
1570
+ const value = await parseBody(errorBody, context);
1571
+ value.message = value.message ?? value.Message;
1572
+ return value;
1573
+ }, "parseErrorBody");
1574
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
1575
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
1576
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
1577
+ let cleanValue = rawValue;
1578
+ if (typeof cleanValue === "number") {
1579
+ cleanValue = cleanValue.toString();
1580
+ }
1581
+ if (cleanValue.indexOf(",") >= 0) {
1582
+ cleanValue = cleanValue.split(",")[0];
1583
+ }
1584
+ if (cleanValue.indexOf(":") >= 0) {
1585
+ cleanValue = cleanValue.split(":")[0];
1586
+ }
1587
+ if (cleanValue.indexOf("#") >= 0) {
1588
+ cleanValue = cleanValue.split("#")[1];
1589
+ }
1590
+ return cleanValue;
1591
+ }, "sanitizeErrorCode");
1592
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
1593
+ if (headerKey !== void 0) {
1594
+ return sanitizeErrorCode(output.headers[headerKey]);
1595
+ }
1596
+ if (data.code !== void 0) {
1597
+ return sanitizeErrorCode(data.code);
1598
+ }
1599
+ if (data["__type"] !== void 0) {
1600
+ return sanitizeErrorCode(data["__type"]);
1601
+ }
1602
+ }, "loadRestJsonErrorCode");
1603
+
1604
+ // src/commands/DecryptDataCommand.ts
1605
+ var _DecryptDataCommand = class _DecryptDataCommand extends import_smithy_client.Command.classBuilder().ep({
1606
+ ...commonParams
1607
+ }).m(function(Command, cs, config, o) {
1608
+ return [
1609
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1610
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1611
+ ];
1612
+ }).s("PaymentCryptographyDataPlane", "DecryptData", {}).n("PaymentCryptographyDataClient", "DecryptDataCommand").f(DecryptDataInputFilterSensitiveLog, DecryptDataOutputFilterSensitiveLog).ser(se_DecryptDataCommand).de(de_DecryptDataCommand).build() {
1613
+ };
1614
+ __name(_DecryptDataCommand, "DecryptDataCommand");
1615
+ var DecryptDataCommand = _DecryptDataCommand;
1616
+
1617
+ // src/commands/EncryptDataCommand.ts
1618
+
1619
+
1620
+
1621
+
1622
+ var _EncryptDataCommand = class _EncryptDataCommand extends import_smithy_client.Command.classBuilder().ep({
1623
+ ...commonParams
1624
+ }).m(function(Command, cs, config, o) {
1625
+ return [
1626
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1627
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1628
+ ];
1629
+ }).s("PaymentCryptographyDataPlane", "EncryptData", {}).n("PaymentCryptographyDataClient", "EncryptDataCommand").f(EncryptDataInputFilterSensitiveLog, EncryptDataOutputFilterSensitiveLog).ser(se_EncryptDataCommand).de(de_EncryptDataCommand).build() {
1630
+ };
1631
+ __name(_EncryptDataCommand, "EncryptDataCommand");
1632
+ var EncryptDataCommand = _EncryptDataCommand;
1633
+
1634
+ // src/commands/GenerateCardValidationDataCommand.ts
1635
+
1636
+
1637
+
1638
+
1639
+ var _GenerateCardValidationDataCommand = class _GenerateCardValidationDataCommand extends import_smithy_client.Command.classBuilder().ep({
1640
+ ...commonParams
1641
+ }).m(function(Command, cs, config, o) {
1642
+ return [
1643
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1644
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1645
+ ];
1646
+ }).s("PaymentCryptographyDataPlane", "GenerateCardValidationData", {}).n("PaymentCryptographyDataClient", "GenerateCardValidationDataCommand").f(GenerateCardValidationDataInputFilterSensitiveLog, void 0).ser(se_GenerateCardValidationDataCommand).de(de_GenerateCardValidationDataCommand).build() {
1647
+ };
1648
+ __name(_GenerateCardValidationDataCommand, "GenerateCardValidationDataCommand");
1649
+ var GenerateCardValidationDataCommand = _GenerateCardValidationDataCommand;
1650
+
1651
+ // src/commands/GenerateMacCommand.ts
1652
+
1653
+
1654
+
1655
+
1656
+ var _GenerateMacCommand = class _GenerateMacCommand extends import_smithy_client.Command.classBuilder().ep({
1657
+ ...commonParams
1658
+ }).m(function(Command, cs, config, o) {
1659
+ return [
1660
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1661
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1662
+ ];
1663
+ }).s("PaymentCryptographyDataPlane", "GenerateMac", {}).n("PaymentCryptographyDataClient", "GenerateMacCommand").f(GenerateMacInputFilterSensitiveLog, void 0).ser(se_GenerateMacCommand).de(de_GenerateMacCommand).build() {
1664
+ };
1665
+ __name(_GenerateMacCommand, "GenerateMacCommand");
1666
+ var GenerateMacCommand = _GenerateMacCommand;
1667
+
1668
+ // src/commands/GeneratePinDataCommand.ts
1669
+
1670
+
1671
+
1672
+
1673
+ var _GeneratePinDataCommand = class _GeneratePinDataCommand extends import_smithy_client.Command.classBuilder().ep({
1674
+ ...commonParams
1675
+ }).m(function(Command, cs, config, o) {
1676
+ return [
1677
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1678
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1679
+ ];
1680
+ }).s("PaymentCryptographyDataPlane", "GeneratePinData", {}).n("PaymentCryptographyDataClient", "GeneratePinDataCommand").f(GeneratePinDataInputFilterSensitiveLog, void 0).ser(se_GeneratePinDataCommand).de(de_GeneratePinDataCommand).build() {
1681
+ };
1682
+ __name(_GeneratePinDataCommand, "GeneratePinDataCommand");
1683
+ var GeneratePinDataCommand = _GeneratePinDataCommand;
1684
+
1685
+ // src/commands/ReEncryptDataCommand.ts
1686
+
1687
+
1688
+
1689
+
1690
+ var _ReEncryptDataCommand = class _ReEncryptDataCommand extends import_smithy_client.Command.classBuilder().ep({
1691
+ ...commonParams
1692
+ }).m(function(Command, cs, config, o) {
1693
+ return [
1694
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1695
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1696
+ ];
1697
+ }).s("PaymentCryptographyDataPlane", "ReEncryptData", {}).n("PaymentCryptographyDataClient", "ReEncryptDataCommand").f(ReEncryptDataInputFilterSensitiveLog, ReEncryptDataOutputFilterSensitiveLog).ser(se_ReEncryptDataCommand).de(de_ReEncryptDataCommand).build() {
1698
+ };
1699
+ __name(_ReEncryptDataCommand, "ReEncryptDataCommand");
1700
+ var ReEncryptDataCommand = _ReEncryptDataCommand;
1701
+
1702
+ // src/commands/TranslatePinDataCommand.ts
1703
+
1704
+
1705
+
1706
+
1707
+ var _TranslatePinDataCommand = class _TranslatePinDataCommand extends import_smithy_client.Command.classBuilder().ep({
1708
+ ...commonParams
1709
+ }).m(function(Command, cs, config, o) {
1710
+ return [
1711
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1712
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1713
+ ];
1714
+ }).s("PaymentCryptographyDataPlane", "TranslatePinData", {}).n("PaymentCryptographyDataClient", "TranslatePinDataCommand").f(TranslatePinDataInputFilterSensitiveLog, void 0).ser(se_TranslatePinDataCommand).de(de_TranslatePinDataCommand).build() {
1715
+ };
1716
+ __name(_TranslatePinDataCommand, "TranslatePinDataCommand");
1717
+ var TranslatePinDataCommand = _TranslatePinDataCommand;
1718
+
1719
+ // src/commands/VerifyAuthRequestCryptogramCommand.ts
1720
+
1721
+
1722
+
1723
+
1724
+ var _VerifyAuthRequestCryptogramCommand = class _VerifyAuthRequestCryptogramCommand extends import_smithy_client.Command.classBuilder().ep({
1725
+ ...commonParams
1726
+ }).m(function(Command, cs, config, o) {
1727
+ return [
1728
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1729
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1730
+ ];
1731
+ }).s("PaymentCryptographyDataPlane", "VerifyAuthRequestCryptogram", {}).n("PaymentCryptographyDataClient", "VerifyAuthRequestCryptogramCommand").f(VerifyAuthRequestCryptogramInputFilterSensitiveLog, void 0).ser(se_VerifyAuthRequestCryptogramCommand).de(de_VerifyAuthRequestCryptogramCommand).build() {
1732
+ };
1733
+ __name(_VerifyAuthRequestCryptogramCommand, "VerifyAuthRequestCryptogramCommand");
1734
+ var VerifyAuthRequestCryptogramCommand = _VerifyAuthRequestCryptogramCommand;
1735
+
1736
+ // src/commands/VerifyCardValidationDataCommand.ts
1737
+
1738
+
1739
+
1740
+
1741
+ var _VerifyCardValidationDataCommand = class _VerifyCardValidationDataCommand extends import_smithy_client.Command.classBuilder().ep({
1742
+ ...commonParams
1743
+ }).m(function(Command, cs, config, o) {
1744
+ return [
1745
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1746
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1747
+ ];
1748
+ }).s("PaymentCryptographyDataPlane", "VerifyCardValidationData", {}).n("PaymentCryptographyDataClient", "VerifyCardValidationDataCommand").f(VerifyCardValidationDataInputFilterSensitiveLog, void 0).ser(se_VerifyCardValidationDataCommand).de(de_VerifyCardValidationDataCommand).build() {
1749
+ };
1750
+ __name(_VerifyCardValidationDataCommand, "VerifyCardValidationDataCommand");
1751
+ var VerifyCardValidationDataCommand = _VerifyCardValidationDataCommand;
1752
+
1753
+ // src/commands/VerifyMacCommand.ts
1754
+
1755
+
1756
+
1757
+
1758
+ var _VerifyMacCommand = class _VerifyMacCommand extends import_smithy_client.Command.classBuilder().ep({
1759
+ ...commonParams
1760
+ }).m(function(Command, cs, config, o) {
1761
+ return [
1762
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1763
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1764
+ ];
1765
+ }).s("PaymentCryptographyDataPlane", "VerifyMac", {}).n("PaymentCryptographyDataClient", "VerifyMacCommand").f(VerifyMacInputFilterSensitiveLog, void 0).ser(se_VerifyMacCommand).de(de_VerifyMacCommand).build() {
1766
+ };
1767
+ __name(_VerifyMacCommand, "VerifyMacCommand");
1768
+ var VerifyMacCommand = _VerifyMacCommand;
1769
+
1770
+ // src/commands/VerifyPinDataCommand.ts
1771
+
1772
+
1773
+
1774
+
1775
+ var _VerifyPinDataCommand = class _VerifyPinDataCommand extends import_smithy_client.Command.classBuilder().ep({
1776
+ ...commonParams
1777
+ }).m(function(Command, cs, config, o) {
1778
+ return [
1779
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1780
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1781
+ ];
1782
+ }).s("PaymentCryptographyDataPlane", "VerifyPinData", {}).n("PaymentCryptographyDataClient", "VerifyPinDataCommand").f(VerifyPinDataInputFilterSensitiveLog, void 0).ser(se_VerifyPinDataCommand).de(de_VerifyPinDataCommand).build() {
1783
+ };
1784
+ __name(_VerifyPinDataCommand, "VerifyPinDataCommand");
1785
+ var VerifyPinDataCommand = _VerifyPinDataCommand;
1786
+
1787
+ // src/PaymentCryptographyData.ts
1788
+ var commands = {
1789
+ DecryptDataCommand,
1790
+ EncryptDataCommand,
1791
+ GenerateCardValidationDataCommand,
1792
+ GenerateMacCommand,
1793
+ GeneratePinDataCommand,
1794
+ ReEncryptDataCommand,
1795
+ TranslatePinDataCommand,
1796
+ VerifyAuthRequestCryptogramCommand,
1797
+ VerifyCardValidationDataCommand,
1798
+ VerifyMacCommand,
1799
+ VerifyPinDataCommand
1800
+ };
1801
+ var _PaymentCryptographyData = class _PaymentCryptographyData extends PaymentCryptographyDataClient {
1802
+ };
1803
+ __name(_PaymentCryptographyData, "PaymentCryptographyData");
1804
+ var PaymentCryptographyData = _PaymentCryptographyData;
1805
+ (0, import_smithy_client.createAggregatedClient)(commands, PaymentCryptographyData);
1806
+
1807
+ // src/index.ts
1808
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
1809
+ // Annotate the CommonJS export names for ESM import in node:
1810
+ 0 && (module.exports = {
1811
+ AccessDeniedException,
1812
+ CardGenerationAttributes,
1813
+ CardVerificationAttributes,
1814
+ CryptogramAuthResponse,
1815
+ DecryptDataCommand,
1816
+ DecryptDataInputFilterSensitiveLog,
1817
+ DecryptDataOutputFilterSensitiveLog,
1818
+ DukptDerivationType,
1819
+ DukptEncryptionAttributesFilterSensitiveLog,
1820
+ DukptEncryptionMode,
1821
+ DukptKeyVariant,
1822
+ EncryptDataCommand,
1823
+ EncryptDataInputFilterSensitiveLog,
1824
+ EncryptDataOutputFilterSensitiveLog,
1825
+ EncryptionDecryptionAttributes,
1826
+ EncryptionDecryptionAttributesFilterSensitiveLog,
1827
+ EncryptionMode,
1828
+ GenerateCardValidationDataCommand,
1829
+ GenerateCardValidationDataInputFilterSensitiveLog,
1830
+ GenerateMacCommand,
1831
+ GenerateMacInputFilterSensitiveLog,
1832
+ GeneratePinDataCommand,
1833
+ GeneratePinDataInputFilterSensitiveLog,
1834
+ InternalServerException,
1835
+ MacAlgorithm,
1836
+ MacAlgorithmEmvFilterSensitiveLog,
1837
+ MacAttributes,
1838
+ MacAttributesFilterSensitiveLog,
1839
+ MajorKeyDerivationMode,
1840
+ PaddingType,
1841
+ PaymentCryptographyData,
1842
+ PaymentCryptographyDataClient,
1843
+ PaymentCryptographyDataServiceException,
1844
+ PinBlockFormatForPinData,
1845
+ PinData,
1846
+ PinGenerationAttributes,
1847
+ PinVerificationAttributes,
1848
+ ReEncryptDataCommand,
1849
+ ReEncryptDataInputFilterSensitiveLog,
1850
+ ReEncryptDataOutputFilterSensitiveLog,
1851
+ ReEncryptionAttributes,
1852
+ ReEncryptionAttributesFilterSensitiveLog,
1853
+ ResourceNotFoundException,
1854
+ SessionKeyAmexFilterSensitiveLog,
1855
+ SessionKeyDerivation,
1856
+ SessionKeyDerivationFilterSensitiveLog,
1857
+ SessionKeyDerivationMode,
1858
+ SessionKeyDerivationValue,
1859
+ SessionKeyEmv2000FilterSensitiveLog,
1860
+ SessionKeyEmvCommonFilterSensitiveLog,
1861
+ SessionKeyMastercardFilterSensitiveLog,
1862
+ SessionKeyVisaFilterSensitiveLog,
1863
+ SymmetricEncryptionAttributesFilterSensitiveLog,
1864
+ ThrottlingException,
1865
+ TranslatePinDataCommand,
1866
+ TranslatePinDataInputFilterSensitiveLog,
1867
+ TranslationIsoFormats,
1868
+ TranslationIsoFormatsFilterSensitiveLog,
1869
+ TranslationPinDataIsoFormat034FilterSensitiveLog,
1870
+ ValidationException,
1871
+ VerificationFailedException,
1872
+ VerificationFailedReason,
1873
+ VerifyAuthRequestCryptogramCommand,
1874
+ VerifyAuthRequestCryptogramInputFilterSensitiveLog,
1875
+ VerifyCardValidationDataCommand,
1876
+ VerifyCardValidationDataInputFilterSensitiveLog,
1877
+ VerifyMacCommand,
1878
+ VerifyMacInputFilterSensitiveLog,
1879
+ VerifyPinDataCommand,
1880
+ VerifyPinDataInputFilterSensitiveLog,
1881
+ __Client
1882
+ });