@aws-sdk/client-payment-cryptography-data 3.476.0 → 3.477.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.
@@ -2,62 +2,48 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_VerifyPinDataCommand = exports.de_VerifyMacCommand = exports.de_VerifyCardValidationDataCommand = exports.de_VerifyAuthRequestCryptogramCommand = exports.de_TranslatePinDataCommand = exports.de_ReEncryptDataCommand = exports.de_GeneratePinDataCommand = exports.de_GenerateMacCommand = exports.de_GenerateCardValidationDataCommand = exports.de_EncryptDataCommand = exports.de_DecryptDataCommand = exports.se_VerifyPinDataCommand = exports.se_VerifyMacCommand = exports.se_VerifyCardValidationDataCommand = exports.se_VerifyAuthRequestCryptogramCommand = exports.se_TranslatePinDataCommand = exports.se_ReEncryptDataCommand = exports.se_GeneratePinDataCommand = exports.se_GenerateMacCommand = exports.se_GenerateCardValidationDataCommand = exports.se_EncryptDataCommand = exports.se_DecryptDataCommand = void 0;
4
4
  const core_1 = require("@aws-sdk/core");
5
- const protocol_http_1 = require("@smithy/protocol-http");
5
+ const core_2 = require("@smithy/core");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const PaymentCryptographyDataServiceException_1 = require("../models/PaymentCryptographyDataServiceException");
9
9
  const se_DecryptDataCommand = async (input, context) => {
10
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const b = (0, core_2.requestBuilder)(input, context);
11
11
  const headers = {
12
12
  "content-type": "application/json",
13
13
  };
14
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/keys/{KeyIdentifier}/decrypt";
15
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "KeyIdentifier", () => input.KeyIdentifier, "{KeyIdentifier}", false);
14
+ b.bp("/keys/{KeyIdentifier}/decrypt");
15
+ b.p("KeyIdentifier", () => input.KeyIdentifier, "{KeyIdentifier}", false);
16
16
  let body;
17
17
  body = JSON.stringify((0, smithy_client_1.take)(input, {
18
18
  CipherText: [],
19
19
  DecryptionAttributes: (_) => (0, smithy_client_1._json)(_),
20
20
  }));
21
- return new protocol_http_1.HttpRequest({
22
- protocol,
23
- hostname,
24
- port,
25
- method: "POST",
26
- headers,
27
- path: resolvedPath,
28
- body,
29
- });
21
+ b.m("POST").h(headers).b(body);
22
+ return b.build();
30
23
  };
31
24
  exports.se_DecryptDataCommand = se_DecryptDataCommand;
32
25
  const se_EncryptDataCommand = async (input, context) => {
33
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
26
+ const b = (0, core_2.requestBuilder)(input, context);
34
27
  const headers = {
35
28
  "content-type": "application/json",
36
29
  };
37
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/keys/{KeyIdentifier}/encrypt";
38
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "KeyIdentifier", () => input.KeyIdentifier, "{KeyIdentifier}", false);
30
+ b.bp("/keys/{KeyIdentifier}/encrypt");
31
+ b.p("KeyIdentifier", () => input.KeyIdentifier, "{KeyIdentifier}", false);
39
32
  let body;
40
33
  body = JSON.stringify((0, smithy_client_1.take)(input, {
41
34
  EncryptionAttributes: (_) => (0, smithy_client_1._json)(_),
42
35
  PlainText: [],
43
36
  }));
44
- return new protocol_http_1.HttpRequest({
45
- protocol,
46
- hostname,
47
- port,
48
- method: "POST",
49
- headers,
50
- path: resolvedPath,
51
- body,
52
- });
37
+ b.m("POST").h(headers).b(body);
38
+ return b.build();
53
39
  };
54
40
  exports.se_EncryptDataCommand = se_EncryptDataCommand;
55
41
  const se_GenerateCardValidationDataCommand = async (input, context) => {
56
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
42
+ const b = (0, core_2.requestBuilder)(input, context);
57
43
  const headers = {
58
44
  "content-type": "application/json",
59
45
  };
60
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cardvalidationdata/generate";
46
+ b.bp("/cardvalidationdata/generate");
61
47
  let body;
62
48
  body = JSON.stringify((0, smithy_client_1.take)(input, {
63
49
  GenerationAttributes: (_) => (0, smithy_client_1._json)(_),
@@ -65,23 +51,16 @@ const se_GenerateCardValidationDataCommand = async (input, context) => {
65
51
  PrimaryAccountNumber: [],
66
52
  ValidationDataLength: [],
67
53
  }));
68
- return new protocol_http_1.HttpRequest({
69
- protocol,
70
- hostname,
71
- port,
72
- method: "POST",
73
- headers,
74
- path: resolvedPath,
75
- body,
76
- });
54
+ b.m("POST").h(headers).b(body);
55
+ return b.build();
77
56
  };
78
57
  exports.se_GenerateCardValidationDataCommand = se_GenerateCardValidationDataCommand;
79
58
  const se_GenerateMacCommand = async (input, context) => {
80
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
59
+ const b = (0, core_2.requestBuilder)(input, context);
81
60
  const headers = {
82
61
  "content-type": "application/json",
83
62
  };
84
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/mac/generate";
63
+ b.bp("/mac/generate");
85
64
  let body;
86
65
  body = JSON.stringify((0, smithy_client_1.take)(input, {
87
66
  GenerationAttributes: (_) => (0, smithy_client_1._json)(_),
@@ -89,23 +68,16 @@ const se_GenerateMacCommand = async (input, context) => {
89
68
  MacLength: [],
90
69
  MessageData: [],
91
70
  }));
92
- return new protocol_http_1.HttpRequest({
93
- protocol,
94
- hostname,
95
- port,
96
- method: "POST",
97
- headers,
98
- path: resolvedPath,
99
- body,
100
- });
71
+ b.m("POST").h(headers).b(body);
72
+ return b.build();
101
73
  };
102
74
  exports.se_GenerateMacCommand = se_GenerateMacCommand;
103
75
  const se_GeneratePinDataCommand = async (input, context) => {
104
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
76
+ const b = (0, core_2.requestBuilder)(input, context);
105
77
  const headers = {
106
78
  "content-type": "application/json",
107
79
  };
108
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/pindata/generate";
80
+ b.bp("/pindata/generate");
109
81
  let body;
110
82
  body = JSON.stringify((0, smithy_client_1.take)(input, {
111
83
  EncryptionKeyIdentifier: [],
@@ -115,24 +87,17 @@ const se_GeneratePinDataCommand = async (input, context) => {
115
87
  PinDataLength: [],
116
88
  PrimaryAccountNumber: [],
117
89
  }));
118
- return new protocol_http_1.HttpRequest({
119
- protocol,
120
- hostname,
121
- port,
122
- method: "POST",
123
- headers,
124
- path: resolvedPath,
125
- body,
126
- });
90
+ b.m("POST").h(headers).b(body);
91
+ return b.build();
127
92
  };
128
93
  exports.se_GeneratePinDataCommand = se_GeneratePinDataCommand;
129
94
  const se_ReEncryptDataCommand = async (input, context) => {
130
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
95
+ const b = (0, core_2.requestBuilder)(input, context);
131
96
  const headers = {
132
97
  "content-type": "application/json",
133
98
  };
134
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/keys/{IncomingKeyIdentifier}/reencrypt";
135
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IncomingKeyIdentifier", () => input.IncomingKeyIdentifier, "{IncomingKeyIdentifier}", false);
99
+ b.bp("/keys/{IncomingKeyIdentifier}/reencrypt");
100
+ b.p("IncomingKeyIdentifier", () => input.IncomingKeyIdentifier, "{IncomingKeyIdentifier}", false);
136
101
  let body;
137
102
  body = JSON.stringify((0, smithy_client_1.take)(input, {
138
103
  CipherText: [],
@@ -140,23 +105,16 @@ const se_ReEncryptDataCommand = async (input, context) => {
140
105
  OutgoingEncryptionAttributes: (_) => (0, smithy_client_1._json)(_),
141
106
  OutgoingKeyIdentifier: [],
142
107
  }));
143
- return new protocol_http_1.HttpRequest({
144
- protocol,
145
- hostname,
146
- port,
147
- method: "POST",
148
- headers,
149
- path: resolvedPath,
150
- body,
151
- });
108
+ b.m("POST").h(headers).b(body);
109
+ return b.build();
152
110
  };
153
111
  exports.se_ReEncryptDataCommand = se_ReEncryptDataCommand;
154
112
  const se_TranslatePinDataCommand = async (input, context) => {
155
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
113
+ const b = (0, core_2.requestBuilder)(input, context);
156
114
  const headers = {
157
115
  "content-type": "application/json",
158
116
  };
159
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/pindata/translate";
117
+ b.bp("/pindata/translate");
160
118
  let body;
161
119
  body = JSON.stringify((0, smithy_client_1.take)(input, {
162
120
  EncryptedPinBlock: [],
@@ -167,23 +125,16 @@ const se_TranslatePinDataCommand = async (input, context) => {
167
125
  OutgoingKeyIdentifier: [],
168
126
  OutgoingTranslationAttributes: (_) => (0, smithy_client_1._json)(_),
169
127
  }));
170
- return new protocol_http_1.HttpRequest({
171
- protocol,
172
- hostname,
173
- port,
174
- method: "POST",
175
- headers,
176
- path: resolvedPath,
177
- body,
178
- });
128
+ b.m("POST").h(headers).b(body);
129
+ return b.build();
179
130
  };
180
131
  exports.se_TranslatePinDataCommand = se_TranslatePinDataCommand;
181
132
  const se_VerifyAuthRequestCryptogramCommand = async (input, context) => {
182
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
133
+ const b = (0, core_2.requestBuilder)(input, context);
183
134
  const headers = {
184
135
  "content-type": "application/json",
185
136
  };
186
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cryptogram/verify";
137
+ b.bp("/cryptogram/verify");
187
138
  let body;
188
139
  body = JSON.stringify((0, smithy_client_1.take)(input, {
189
140
  AuthRequestCryptogram: [],
@@ -193,23 +144,16 @@ const se_VerifyAuthRequestCryptogramCommand = async (input, context) => {
193
144
  SessionKeyDerivationAttributes: (_) => (0, smithy_client_1._json)(_),
194
145
  TransactionData: [],
195
146
  }));
196
- return new protocol_http_1.HttpRequest({
197
- protocol,
198
- hostname,
199
- port,
200
- method: "POST",
201
- headers,
202
- path: resolvedPath,
203
- body,
204
- });
147
+ b.m("POST").h(headers).b(body);
148
+ return b.build();
205
149
  };
206
150
  exports.se_VerifyAuthRequestCryptogramCommand = se_VerifyAuthRequestCryptogramCommand;
207
151
  const se_VerifyCardValidationDataCommand = async (input, context) => {
208
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
152
+ const b = (0, core_2.requestBuilder)(input, context);
209
153
  const headers = {
210
154
  "content-type": "application/json",
211
155
  };
212
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cardvalidationdata/verify";
156
+ b.bp("/cardvalidationdata/verify");
213
157
  let body;
214
158
  body = JSON.stringify((0, smithy_client_1.take)(input, {
215
159
  KeyIdentifier: [],
@@ -217,23 +161,16 @@ const se_VerifyCardValidationDataCommand = async (input, context) => {
217
161
  ValidationData: [],
218
162
  VerificationAttributes: (_) => (0, smithy_client_1._json)(_),
219
163
  }));
220
- return new protocol_http_1.HttpRequest({
221
- protocol,
222
- hostname,
223
- port,
224
- method: "POST",
225
- headers,
226
- path: resolvedPath,
227
- body,
228
- });
164
+ b.m("POST").h(headers).b(body);
165
+ return b.build();
229
166
  };
230
167
  exports.se_VerifyCardValidationDataCommand = se_VerifyCardValidationDataCommand;
231
168
  const se_VerifyMacCommand = async (input, context) => {
232
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
169
+ const b = (0, core_2.requestBuilder)(input, context);
233
170
  const headers = {
234
171
  "content-type": "application/json",
235
172
  };
236
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/mac/verify";
173
+ b.bp("/mac/verify");
237
174
  let body;
238
175
  body = JSON.stringify((0, smithy_client_1.take)(input, {
239
176
  KeyIdentifier: [],
@@ -242,23 +179,16 @@ const se_VerifyMacCommand = async (input, context) => {
242
179
  MessageData: [],
243
180
  VerificationAttributes: (_) => (0, smithy_client_1._json)(_),
244
181
  }));
245
- return new protocol_http_1.HttpRequest({
246
- protocol,
247
- hostname,
248
- port,
249
- method: "POST",
250
- headers,
251
- path: resolvedPath,
252
- body,
253
- });
182
+ b.m("POST").h(headers).b(body);
183
+ return b.build();
254
184
  };
255
185
  exports.se_VerifyMacCommand = se_VerifyMacCommand;
256
186
  const se_VerifyPinDataCommand = async (input, context) => {
257
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
187
+ const b = (0, core_2.requestBuilder)(input, context);
258
188
  const headers = {
259
189
  "content-type": "application/json",
260
190
  };
261
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/pindata/verify";
191
+ b.bp("/pindata/verify");
262
192
  let body;
263
193
  body = JSON.stringify((0, smithy_client_1.take)(input, {
264
194
  DukptAttributes: (_) => (0, smithy_client_1._json)(_),
@@ -270,15 +200,8 @@ const se_VerifyPinDataCommand = async (input, context) => {
270
200
  VerificationAttributes: (_) => (0, smithy_client_1._json)(_),
271
201
  VerificationKeyIdentifier: [],
272
202
  }));
273
- return new protocol_http_1.HttpRequest({
274
- protocol,
275
- hostname,
276
- port,
277
- method: "POST",
278
- headers,
279
- path: resolvedPath,
280
- body,
281
- });
203
+ b.m("POST").h(headers).b(body);
204
+ return b.build();
282
205
  };
283
206
  exports.se_VerifyPinDataCommand = se_VerifyPinDataCommand;
284
207
  const de_DecryptDataCommand = async (output, context) => {
@@ -1,58 +1,44 @@
1
1
  import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
2
+ import { requestBuilder as rb } from "@smithy/core";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { AccessDeniedException, InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException, VerificationFailedException, } from "../models/models_0";
5
5
  import { PaymentCryptographyDataServiceException as __BaseException } from "../models/PaymentCryptographyDataServiceException";
6
6
  export const se_DecryptDataCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = {
9
9
  "content-type": "application/json",
10
10
  };
11
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/keys/{KeyIdentifier}/decrypt";
12
- resolvedPath = __resolvedPath(resolvedPath, input, "KeyIdentifier", () => input.KeyIdentifier, "{KeyIdentifier}", false);
11
+ b.bp("/keys/{KeyIdentifier}/decrypt");
12
+ b.p("KeyIdentifier", () => input.KeyIdentifier, "{KeyIdentifier}", false);
13
13
  let body;
14
14
  body = JSON.stringify(take(input, {
15
15
  CipherText: [],
16
16
  DecryptionAttributes: (_) => _json(_),
17
17
  }));
18
- return new __HttpRequest({
19
- protocol,
20
- hostname,
21
- port,
22
- method: "POST",
23
- headers,
24
- path: resolvedPath,
25
- body,
26
- });
18
+ b.m("POST").h(headers).b(body);
19
+ return b.build();
27
20
  };
28
21
  export const se_EncryptDataCommand = async (input, context) => {
29
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
22
+ const b = rb(input, context);
30
23
  const headers = {
31
24
  "content-type": "application/json",
32
25
  };
33
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/keys/{KeyIdentifier}/encrypt";
34
- resolvedPath = __resolvedPath(resolvedPath, input, "KeyIdentifier", () => input.KeyIdentifier, "{KeyIdentifier}", false);
26
+ b.bp("/keys/{KeyIdentifier}/encrypt");
27
+ b.p("KeyIdentifier", () => input.KeyIdentifier, "{KeyIdentifier}", false);
35
28
  let body;
36
29
  body = JSON.stringify(take(input, {
37
30
  EncryptionAttributes: (_) => _json(_),
38
31
  PlainText: [],
39
32
  }));
40
- return new __HttpRequest({
41
- protocol,
42
- hostname,
43
- port,
44
- method: "POST",
45
- headers,
46
- path: resolvedPath,
47
- body,
48
- });
33
+ b.m("POST").h(headers).b(body);
34
+ return b.build();
49
35
  };
50
36
  export const se_GenerateCardValidationDataCommand = async (input, context) => {
51
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
37
+ const b = rb(input, context);
52
38
  const headers = {
53
39
  "content-type": "application/json",
54
40
  };
55
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cardvalidationdata/generate";
41
+ b.bp("/cardvalidationdata/generate");
56
42
  let body;
57
43
  body = JSON.stringify(take(input, {
58
44
  GenerationAttributes: (_) => _json(_),
@@ -60,22 +46,15 @@ export const se_GenerateCardValidationDataCommand = async (input, context) => {
60
46
  PrimaryAccountNumber: [],
61
47
  ValidationDataLength: [],
62
48
  }));
63
- return new __HttpRequest({
64
- protocol,
65
- hostname,
66
- port,
67
- method: "POST",
68
- headers,
69
- path: resolvedPath,
70
- body,
71
- });
49
+ b.m("POST").h(headers).b(body);
50
+ return b.build();
72
51
  };
73
52
  export const se_GenerateMacCommand = async (input, context) => {
74
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
53
+ const b = rb(input, context);
75
54
  const headers = {
76
55
  "content-type": "application/json",
77
56
  };
78
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/mac/generate";
57
+ b.bp("/mac/generate");
79
58
  let body;
80
59
  body = JSON.stringify(take(input, {
81
60
  GenerationAttributes: (_) => _json(_),
@@ -83,22 +62,15 @@ export const se_GenerateMacCommand = async (input, context) => {
83
62
  MacLength: [],
84
63
  MessageData: [],
85
64
  }));
86
- return new __HttpRequest({
87
- protocol,
88
- hostname,
89
- port,
90
- method: "POST",
91
- headers,
92
- path: resolvedPath,
93
- body,
94
- });
65
+ b.m("POST").h(headers).b(body);
66
+ return b.build();
95
67
  };
96
68
  export const se_GeneratePinDataCommand = async (input, context) => {
97
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
69
+ const b = rb(input, context);
98
70
  const headers = {
99
71
  "content-type": "application/json",
100
72
  };
101
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/pindata/generate";
73
+ b.bp("/pindata/generate");
102
74
  let body;
103
75
  body = JSON.stringify(take(input, {
104
76
  EncryptionKeyIdentifier: [],
@@ -108,23 +80,16 @@ export const se_GeneratePinDataCommand = async (input, context) => {
108
80
  PinDataLength: [],
109
81
  PrimaryAccountNumber: [],
110
82
  }));
111
- return new __HttpRequest({
112
- protocol,
113
- hostname,
114
- port,
115
- method: "POST",
116
- headers,
117
- path: resolvedPath,
118
- body,
119
- });
83
+ b.m("POST").h(headers).b(body);
84
+ return b.build();
120
85
  };
121
86
  export const se_ReEncryptDataCommand = async (input, context) => {
122
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
87
+ const b = rb(input, context);
123
88
  const headers = {
124
89
  "content-type": "application/json",
125
90
  };
126
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/keys/{IncomingKeyIdentifier}/reencrypt";
127
- resolvedPath = __resolvedPath(resolvedPath, input, "IncomingKeyIdentifier", () => input.IncomingKeyIdentifier, "{IncomingKeyIdentifier}", false);
91
+ b.bp("/keys/{IncomingKeyIdentifier}/reencrypt");
92
+ b.p("IncomingKeyIdentifier", () => input.IncomingKeyIdentifier, "{IncomingKeyIdentifier}", false);
128
93
  let body;
129
94
  body = JSON.stringify(take(input, {
130
95
  CipherText: [],
@@ -132,22 +97,15 @@ export const se_ReEncryptDataCommand = async (input, context) => {
132
97
  OutgoingEncryptionAttributes: (_) => _json(_),
133
98
  OutgoingKeyIdentifier: [],
134
99
  }));
135
- return new __HttpRequest({
136
- protocol,
137
- hostname,
138
- port,
139
- method: "POST",
140
- headers,
141
- path: resolvedPath,
142
- body,
143
- });
100
+ b.m("POST").h(headers).b(body);
101
+ return b.build();
144
102
  };
145
103
  export const se_TranslatePinDataCommand = async (input, context) => {
146
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
104
+ const b = rb(input, context);
147
105
  const headers = {
148
106
  "content-type": "application/json",
149
107
  };
150
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/pindata/translate";
108
+ b.bp("/pindata/translate");
151
109
  let body;
152
110
  body = JSON.stringify(take(input, {
153
111
  EncryptedPinBlock: [],
@@ -158,22 +116,15 @@ export const se_TranslatePinDataCommand = async (input, context) => {
158
116
  OutgoingKeyIdentifier: [],
159
117
  OutgoingTranslationAttributes: (_) => _json(_),
160
118
  }));
161
- return new __HttpRequest({
162
- protocol,
163
- hostname,
164
- port,
165
- method: "POST",
166
- headers,
167
- path: resolvedPath,
168
- body,
169
- });
119
+ b.m("POST").h(headers).b(body);
120
+ return b.build();
170
121
  };
171
122
  export const se_VerifyAuthRequestCryptogramCommand = async (input, context) => {
172
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
123
+ const b = rb(input, context);
173
124
  const headers = {
174
125
  "content-type": "application/json",
175
126
  };
176
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cryptogram/verify";
127
+ b.bp("/cryptogram/verify");
177
128
  let body;
178
129
  body = JSON.stringify(take(input, {
179
130
  AuthRequestCryptogram: [],
@@ -183,22 +134,15 @@ export const se_VerifyAuthRequestCryptogramCommand = async (input, context) => {
183
134
  SessionKeyDerivationAttributes: (_) => _json(_),
184
135
  TransactionData: [],
185
136
  }));
186
- return new __HttpRequest({
187
- protocol,
188
- hostname,
189
- port,
190
- method: "POST",
191
- headers,
192
- path: resolvedPath,
193
- body,
194
- });
137
+ b.m("POST").h(headers).b(body);
138
+ return b.build();
195
139
  };
196
140
  export const se_VerifyCardValidationDataCommand = async (input, context) => {
197
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
141
+ const b = rb(input, context);
198
142
  const headers = {
199
143
  "content-type": "application/json",
200
144
  };
201
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cardvalidationdata/verify";
145
+ b.bp("/cardvalidationdata/verify");
202
146
  let body;
203
147
  body = JSON.stringify(take(input, {
204
148
  KeyIdentifier: [],
@@ -206,22 +150,15 @@ export const se_VerifyCardValidationDataCommand = async (input, context) => {
206
150
  ValidationData: [],
207
151
  VerificationAttributes: (_) => _json(_),
208
152
  }));
209
- return new __HttpRequest({
210
- protocol,
211
- hostname,
212
- port,
213
- method: "POST",
214
- headers,
215
- path: resolvedPath,
216
- body,
217
- });
153
+ b.m("POST").h(headers).b(body);
154
+ return b.build();
218
155
  };
219
156
  export const se_VerifyMacCommand = async (input, context) => {
220
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
157
+ const b = rb(input, context);
221
158
  const headers = {
222
159
  "content-type": "application/json",
223
160
  };
224
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/mac/verify";
161
+ b.bp("/mac/verify");
225
162
  let body;
226
163
  body = JSON.stringify(take(input, {
227
164
  KeyIdentifier: [],
@@ -230,22 +167,15 @@ export const se_VerifyMacCommand = async (input, context) => {
230
167
  MessageData: [],
231
168
  VerificationAttributes: (_) => _json(_),
232
169
  }));
233
- return new __HttpRequest({
234
- protocol,
235
- hostname,
236
- port,
237
- method: "POST",
238
- headers,
239
- path: resolvedPath,
240
- body,
241
- });
170
+ b.m("POST").h(headers).b(body);
171
+ return b.build();
242
172
  };
243
173
  export const se_VerifyPinDataCommand = async (input, context) => {
244
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
174
+ const b = rb(input, context);
245
175
  const headers = {
246
176
  "content-type": "application/json",
247
177
  };
248
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/pindata/verify";
178
+ b.bp("/pindata/verify");
249
179
  let body;
250
180
  body = JSON.stringify(take(input, {
251
181
  DukptAttributes: (_) => _json(_),
@@ -257,15 +187,8 @@ export const se_VerifyPinDataCommand = async (input, context) => {
257
187
  VerificationAttributes: (_) => _json(_),
258
188
  VerificationKeyIdentifier: [],
259
189
  }));
260
- return new __HttpRequest({
261
- protocol,
262
- hostname,
263
- port,
264
- method: "POST",
265
- headers,
266
- path: resolvedPath,
267
- body,
268
- });
190
+ b.m("POST").h(headers).b(body);
191
+ return b.build();
269
192
  };
270
193
  export const de_DecryptDataCommand = async (output, context) => {
271
194
  if (output.statusCode !== 200 && output.statusCode >= 300) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-payment-cryptography-data",
3
3
  "description": "AWS SDK for JavaScript Payment Cryptography Data Client for Node.js, Browser and React Native",
4
- "version": "3.476.0",
4
+ "version": "3.477.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.476.0",
24
- "@aws-sdk/core": "3.476.0",
25
- "@aws-sdk/credential-provider-node": "3.476.0",
23
+ "@aws-sdk/client-sts": "3.477.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.477.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
@@ -34,6 +34,7 @@
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",