@aws-sdk/client-comprehendmedical 3.310.0 → 3.312.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.
@@ -8,260 +8,182 @@ const uuid_1 = require("uuid");
8
8
  const ComprehendMedicalServiceException_1 = require("../models/ComprehendMedicalServiceException");
9
9
  const models_0_1 = require("../models/models_0");
10
10
  const se_DescribeEntitiesDetectionV2JobCommand = async (input, context) => {
11
- const headers = {
12
- "content-type": "application/x-amz-json-1.1",
13
- "x-amz-target": "ComprehendMedical_20181030.DescribeEntitiesDetectionV2Job",
14
- };
11
+ const headers = sharedHeaders("DescribeEntitiesDetectionV2Job");
15
12
  let body;
16
13
  body = JSON.stringify(se_DescribeEntitiesDetectionV2JobRequest(input, context));
17
14
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
18
15
  };
19
16
  exports.se_DescribeEntitiesDetectionV2JobCommand = se_DescribeEntitiesDetectionV2JobCommand;
20
17
  const se_DescribeICD10CMInferenceJobCommand = async (input, context) => {
21
- const headers = {
22
- "content-type": "application/x-amz-json-1.1",
23
- "x-amz-target": "ComprehendMedical_20181030.DescribeICD10CMInferenceJob",
24
- };
18
+ const headers = sharedHeaders("DescribeICD10CMInferenceJob");
25
19
  let body;
26
20
  body = JSON.stringify(se_DescribeICD10CMInferenceJobRequest(input, context));
27
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
22
  };
29
23
  exports.se_DescribeICD10CMInferenceJobCommand = se_DescribeICD10CMInferenceJobCommand;
30
24
  const se_DescribePHIDetectionJobCommand = async (input, context) => {
31
- const headers = {
32
- "content-type": "application/x-amz-json-1.1",
33
- "x-amz-target": "ComprehendMedical_20181030.DescribePHIDetectionJob",
34
- };
25
+ const headers = sharedHeaders("DescribePHIDetectionJob");
35
26
  let body;
36
27
  body = JSON.stringify(se_DescribePHIDetectionJobRequest(input, context));
37
28
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
38
29
  };
39
30
  exports.se_DescribePHIDetectionJobCommand = se_DescribePHIDetectionJobCommand;
40
31
  const se_DescribeRxNormInferenceJobCommand = async (input, context) => {
41
- const headers = {
42
- "content-type": "application/x-amz-json-1.1",
43
- "x-amz-target": "ComprehendMedical_20181030.DescribeRxNormInferenceJob",
44
- };
32
+ const headers = sharedHeaders("DescribeRxNormInferenceJob");
45
33
  let body;
46
34
  body = JSON.stringify(se_DescribeRxNormInferenceJobRequest(input, context));
47
35
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
36
  };
49
37
  exports.se_DescribeRxNormInferenceJobCommand = se_DescribeRxNormInferenceJobCommand;
50
38
  const se_DescribeSNOMEDCTInferenceJobCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.1",
53
- "x-amz-target": "ComprehendMedical_20181030.DescribeSNOMEDCTInferenceJob",
54
- };
39
+ const headers = sharedHeaders("DescribeSNOMEDCTInferenceJob");
55
40
  let body;
56
41
  body = JSON.stringify(se_DescribeSNOMEDCTInferenceJobRequest(input, context));
57
42
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
43
  };
59
44
  exports.se_DescribeSNOMEDCTInferenceJobCommand = se_DescribeSNOMEDCTInferenceJobCommand;
60
45
  const se_DetectEntitiesCommand = async (input, context) => {
61
- const headers = {
62
- "content-type": "application/x-amz-json-1.1",
63
- "x-amz-target": "ComprehendMedical_20181030.DetectEntities",
64
- };
46
+ const headers = sharedHeaders("DetectEntities");
65
47
  let body;
66
48
  body = JSON.stringify(se_DetectEntitiesRequest(input, context));
67
49
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
68
50
  };
69
51
  exports.se_DetectEntitiesCommand = se_DetectEntitiesCommand;
70
52
  const se_DetectEntitiesV2Command = async (input, context) => {
71
- const headers = {
72
- "content-type": "application/x-amz-json-1.1",
73
- "x-amz-target": "ComprehendMedical_20181030.DetectEntitiesV2",
74
- };
53
+ const headers = sharedHeaders("DetectEntitiesV2");
75
54
  let body;
76
55
  body = JSON.stringify(se_DetectEntitiesV2Request(input, context));
77
56
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
78
57
  };
79
58
  exports.se_DetectEntitiesV2Command = se_DetectEntitiesV2Command;
80
59
  const se_DetectPHICommand = async (input, context) => {
81
- const headers = {
82
- "content-type": "application/x-amz-json-1.1",
83
- "x-amz-target": "ComprehendMedical_20181030.DetectPHI",
84
- };
60
+ const headers = sharedHeaders("DetectPHI");
85
61
  let body;
86
62
  body = JSON.stringify(se_DetectPHIRequest(input, context));
87
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
88
64
  };
89
65
  exports.se_DetectPHICommand = se_DetectPHICommand;
90
66
  const se_InferICD10CMCommand = async (input, context) => {
91
- const headers = {
92
- "content-type": "application/x-amz-json-1.1",
93
- "x-amz-target": "ComprehendMedical_20181030.InferICD10CM",
94
- };
67
+ const headers = sharedHeaders("InferICD10CM");
95
68
  let body;
96
69
  body = JSON.stringify(se_InferICD10CMRequest(input, context));
97
70
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
98
71
  };
99
72
  exports.se_InferICD10CMCommand = se_InferICD10CMCommand;
100
73
  const se_InferRxNormCommand = async (input, context) => {
101
- const headers = {
102
- "content-type": "application/x-amz-json-1.1",
103
- "x-amz-target": "ComprehendMedical_20181030.InferRxNorm",
104
- };
74
+ const headers = sharedHeaders("InferRxNorm");
105
75
  let body;
106
76
  body = JSON.stringify(se_InferRxNormRequest(input, context));
107
77
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
108
78
  };
109
79
  exports.se_InferRxNormCommand = se_InferRxNormCommand;
110
80
  const se_InferSNOMEDCTCommand = async (input, context) => {
111
- const headers = {
112
- "content-type": "application/x-amz-json-1.1",
113
- "x-amz-target": "ComprehendMedical_20181030.InferSNOMEDCT",
114
- };
81
+ const headers = sharedHeaders("InferSNOMEDCT");
115
82
  let body;
116
83
  body = JSON.stringify(se_InferSNOMEDCTRequest(input, context));
117
84
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
118
85
  };
119
86
  exports.se_InferSNOMEDCTCommand = se_InferSNOMEDCTCommand;
120
87
  const se_ListEntitiesDetectionV2JobsCommand = async (input, context) => {
121
- const headers = {
122
- "content-type": "application/x-amz-json-1.1",
123
- "x-amz-target": "ComprehendMedical_20181030.ListEntitiesDetectionV2Jobs",
124
- };
88
+ const headers = sharedHeaders("ListEntitiesDetectionV2Jobs");
125
89
  let body;
126
90
  body = JSON.stringify(se_ListEntitiesDetectionV2JobsRequest(input, context));
127
91
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
128
92
  };
129
93
  exports.se_ListEntitiesDetectionV2JobsCommand = se_ListEntitiesDetectionV2JobsCommand;
130
94
  const se_ListICD10CMInferenceJobsCommand = async (input, context) => {
131
- const headers = {
132
- "content-type": "application/x-amz-json-1.1",
133
- "x-amz-target": "ComprehendMedical_20181030.ListICD10CMInferenceJobs",
134
- };
95
+ const headers = sharedHeaders("ListICD10CMInferenceJobs");
135
96
  let body;
136
97
  body = JSON.stringify(se_ListICD10CMInferenceJobsRequest(input, context));
137
98
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
138
99
  };
139
100
  exports.se_ListICD10CMInferenceJobsCommand = se_ListICD10CMInferenceJobsCommand;
140
101
  const se_ListPHIDetectionJobsCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "ComprehendMedical_20181030.ListPHIDetectionJobs",
144
- };
102
+ const headers = sharedHeaders("ListPHIDetectionJobs");
145
103
  let body;
146
104
  body = JSON.stringify(se_ListPHIDetectionJobsRequest(input, context));
147
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
106
  };
149
107
  exports.se_ListPHIDetectionJobsCommand = se_ListPHIDetectionJobsCommand;
150
108
  const se_ListRxNormInferenceJobsCommand = async (input, context) => {
151
- const headers = {
152
- "content-type": "application/x-amz-json-1.1",
153
- "x-amz-target": "ComprehendMedical_20181030.ListRxNormInferenceJobs",
154
- };
109
+ const headers = sharedHeaders("ListRxNormInferenceJobs");
155
110
  let body;
156
111
  body = JSON.stringify(se_ListRxNormInferenceJobsRequest(input, context));
157
112
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
158
113
  };
159
114
  exports.se_ListRxNormInferenceJobsCommand = se_ListRxNormInferenceJobsCommand;
160
115
  const se_ListSNOMEDCTInferenceJobsCommand = async (input, context) => {
161
- const headers = {
162
- "content-type": "application/x-amz-json-1.1",
163
- "x-amz-target": "ComprehendMedical_20181030.ListSNOMEDCTInferenceJobs",
164
- };
116
+ const headers = sharedHeaders("ListSNOMEDCTInferenceJobs");
165
117
  let body;
166
118
  body = JSON.stringify(se_ListSNOMEDCTInferenceJobsRequest(input, context));
167
119
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
120
  };
169
121
  exports.se_ListSNOMEDCTInferenceJobsCommand = se_ListSNOMEDCTInferenceJobsCommand;
170
122
  const se_StartEntitiesDetectionV2JobCommand = async (input, context) => {
171
- const headers = {
172
- "content-type": "application/x-amz-json-1.1",
173
- "x-amz-target": "ComprehendMedical_20181030.StartEntitiesDetectionV2Job",
174
- };
123
+ const headers = sharedHeaders("StartEntitiesDetectionV2Job");
175
124
  let body;
176
125
  body = JSON.stringify(se_StartEntitiesDetectionV2JobRequest(input, context));
177
126
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
178
127
  };
179
128
  exports.se_StartEntitiesDetectionV2JobCommand = se_StartEntitiesDetectionV2JobCommand;
180
129
  const se_StartICD10CMInferenceJobCommand = async (input, context) => {
181
- const headers = {
182
- "content-type": "application/x-amz-json-1.1",
183
- "x-amz-target": "ComprehendMedical_20181030.StartICD10CMInferenceJob",
184
- };
130
+ const headers = sharedHeaders("StartICD10CMInferenceJob");
185
131
  let body;
186
132
  body = JSON.stringify(se_StartICD10CMInferenceJobRequest(input, context));
187
133
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
188
134
  };
189
135
  exports.se_StartICD10CMInferenceJobCommand = se_StartICD10CMInferenceJobCommand;
190
136
  const se_StartPHIDetectionJobCommand = async (input, context) => {
191
- const headers = {
192
- "content-type": "application/x-amz-json-1.1",
193
- "x-amz-target": "ComprehendMedical_20181030.StartPHIDetectionJob",
194
- };
137
+ const headers = sharedHeaders("StartPHIDetectionJob");
195
138
  let body;
196
139
  body = JSON.stringify(se_StartPHIDetectionJobRequest(input, context));
197
140
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
198
141
  };
199
142
  exports.se_StartPHIDetectionJobCommand = se_StartPHIDetectionJobCommand;
200
143
  const se_StartRxNormInferenceJobCommand = async (input, context) => {
201
- const headers = {
202
- "content-type": "application/x-amz-json-1.1",
203
- "x-amz-target": "ComprehendMedical_20181030.StartRxNormInferenceJob",
204
- };
144
+ const headers = sharedHeaders("StartRxNormInferenceJob");
205
145
  let body;
206
146
  body = JSON.stringify(se_StartRxNormInferenceJobRequest(input, context));
207
147
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
208
148
  };
209
149
  exports.se_StartRxNormInferenceJobCommand = se_StartRxNormInferenceJobCommand;
210
150
  const se_StartSNOMEDCTInferenceJobCommand = async (input, context) => {
211
- const headers = {
212
- "content-type": "application/x-amz-json-1.1",
213
- "x-amz-target": "ComprehendMedical_20181030.StartSNOMEDCTInferenceJob",
214
- };
151
+ const headers = sharedHeaders("StartSNOMEDCTInferenceJob");
215
152
  let body;
216
153
  body = JSON.stringify(se_StartSNOMEDCTInferenceJobRequest(input, context));
217
154
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
218
155
  };
219
156
  exports.se_StartSNOMEDCTInferenceJobCommand = se_StartSNOMEDCTInferenceJobCommand;
220
157
  const se_StopEntitiesDetectionV2JobCommand = async (input, context) => {
221
- const headers = {
222
- "content-type": "application/x-amz-json-1.1",
223
- "x-amz-target": "ComprehendMedical_20181030.StopEntitiesDetectionV2Job",
224
- };
158
+ const headers = sharedHeaders("StopEntitiesDetectionV2Job");
225
159
  let body;
226
160
  body = JSON.stringify(se_StopEntitiesDetectionV2JobRequest(input, context));
227
161
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
228
162
  };
229
163
  exports.se_StopEntitiesDetectionV2JobCommand = se_StopEntitiesDetectionV2JobCommand;
230
164
  const se_StopICD10CMInferenceJobCommand = async (input, context) => {
231
- const headers = {
232
- "content-type": "application/x-amz-json-1.1",
233
- "x-amz-target": "ComprehendMedical_20181030.StopICD10CMInferenceJob",
234
- };
165
+ const headers = sharedHeaders("StopICD10CMInferenceJob");
235
166
  let body;
236
167
  body = JSON.stringify(se_StopICD10CMInferenceJobRequest(input, context));
237
168
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
238
169
  };
239
170
  exports.se_StopICD10CMInferenceJobCommand = se_StopICD10CMInferenceJobCommand;
240
171
  const se_StopPHIDetectionJobCommand = async (input, context) => {
241
- const headers = {
242
- "content-type": "application/x-amz-json-1.1",
243
- "x-amz-target": "ComprehendMedical_20181030.StopPHIDetectionJob",
244
- };
172
+ const headers = sharedHeaders("StopPHIDetectionJob");
245
173
  let body;
246
174
  body = JSON.stringify(se_StopPHIDetectionJobRequest(input, context));
247
175
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
248
176
  };
249
177
  exports.se_StopPHIDetectionJobCommand = se_StopPHIDetectionJobCommand;
250
178
  const se_StopRxNormInferenceJobCommand = async (input, context) => {
251
- const headers = {
252
- "content-type": "application/x-amz-json-1.1",
253
- "x-amz-target": "ComprehendMedical_20181030.StopRxNormInferenceJob",
254
- };
179
+ const headers = sharedHeaders("StopRxNormInferenceJob");
255
180
  let body;
256
181
  body = JSON.stringify(se_StopRxNormInferenceJobRequest(input, context));
257
182
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
258
183
  };
259
184
  exports.se_StopRxNormInferenceJobCommand = se_StopRxNormInferenceJobCommand;
260
185
  const se_StopSNOMEDCTInferenceJobCommand = async (input, context) => {
261
- const headers = {
262
- "content-type": "application/x-amz-json-1.1",
263
- "x-amz-target": "ComprehendMedical_20181030.StopSNOMEDCTInferenceJob",
264
- };
186
+ const headers = sharedHeaders("StopSNOMEDCTInferenceJob");
265
187
  let body;
266
188
  body = JSON.stringify(se_StopSNOMEDCTInferenceJobRequest(input, context));
267
189
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -2305,6 +2227,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
2305
2227
  }
2306
2228
  return new protocol_http_1.HttpRequest(contents);
2307
2229
  };
2230
+ function sharedHeaders(operation) {
2231
+ return {
2232
+ "content-type": "application/x-amz-json-1.1",
2233
+ "x-amz-target": `ComprehendMedical_20181030.${operation}`,
2234
+ };
2235
+ }
2308
2236
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2309
2237
  if (encoded.length) {
2310
2238
  return JSON.parse(encoded);
@@ -4,235 +4,157 @@ import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { ComprehendMedicalServiceException as __BaseException } from "../models/ComprehendMedicalServiceException";
5
5
  import { InternalServerException, InvalidEncodingException, InvalidRequestException, ResourceNotFoundException, ServiceUnavailableException, TextSizeLimitExceededException, TooManyRequestsException, ValidationException, } from "../models/models_0";
6
6
  export const se_DescribeEntitiesDetectionV2JobCommand = async (input, context) => {
7
- const headers = {
8
- "content-type": "application/x-amz-json-1.1",
9
- "x-amz-target": "ComprehendMedical_20181030.DescribeEntitiesDetectionV2Job",
10
- };
7
+ const headers = sharedHeaders("DescribeEntitiesDetectionV2Job");
11
8
  let body;
12
9
  body = JSON.stringify(se_DescribeEntitiesDetectionV2JobRequest(input, context));
13
10
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
11
  };
15
12
  export const se_DescribeICD10CMInferenceJobCommand = async (input, context) => {
16
- const headers = {
17
- "content-type": "application/x-amz-json-1.1",
18
- "x-amz-target": "ComprehendMedical_20181030.DescribeICD10CMInferenceJob",
19
- };
13
+ const headers = sharedHeaders("DescribeICD10CMInferenceJob");
20
14
  let body;
21
15
  body = JSON.stringify(se_DescribeICD10CMInferenceJobRequest(input, context));
22
16
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
17
  };
24
18
  export const se_DescribePHIDetectionJobCommand = async (input, context) => {
25
- const headers = {
26
- "content-type": "application/x-amz-json-1.1",
27
- "x-amz-target": "ComprehendMedical_20181030.DescribePHIDetectionJob",
28
- };
19
+ const headers = sharedHeaders("DescribePHIDetectionJob");
29
20
  let body;
30
21
  body = JSON.stringify(se_DescribePHIDetectionJobRequest(input, context));
31
22
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
32
23
  };
33
24
  export const se_DescribeRxNormInferenceJobCommand = async (input, context) => {
34
- const headers = {
35
- "content-type": "application/x-amz-json-1.1",
36
- "x-amz-target": "ComprehendMedical_20181030.DescribeRxNormInferenceJob",
37
- };
25
+ const headers = sharedHeaders("DescribeRxNormInferenceJob");
38
26
  let body;
39
27
  body = JSON.stringify(se_DescribeRxNormInferenceJobRequest(input, context));
40
28
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
29
  };
42
30
  export const se_DescribeSNOMEDCTInferenceJobCommand = async (input, context) => {
43
- const headers = {
44
- "content-type": "application/x-amz-json-1.1",
45
- "x-amz-target": "ComprehendMedical_20181030.DescribeSNOMEDCTInferenceJob",
46
- };
31
+ const headers = sharedHeaders("DescribeSNOMEDCTInferenceJob");
47
32
  let body;
48
33
  body = JSON.stringify(se_DescribeSNOMEDCTInferenceJobRequest(input, context));
49
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
35
  };
51
36
  export const se_DetectEntitiesCommand = async (input, context) => {
52
- const headers = {
53
- "content-type": "application/x-amz-json-1.1",
54
- "x-amz-target": "ComprehendMedical_20181030.DetectEntities",
55
- };
37
+ const headers = sharedHeaders("DetectEntities");
56
38
  let body;
57
39
  body = JSON.stringify(se_DetectEntitiesRequest(input, context));
58
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
41
  };
60
42
  export const se_DetectEntitiesV2Command = async (input, context) => {
61
- const headers = {
62
- "content-type": "application/x-amz-json-1.1",
63
- "x-amz-target": "ComprehendMedical_20181030.DetectEntitiesV2",
64
- };
43
+ const headers = sharedHeaders("DetectEntitiesV2");
65
44
  let body;
66
45
  body = JSON.stringify(se_DetectEntitiesV2Request(input, context));
67
46
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
68
47
  };
69
48
  export const se_DetectPHICommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.1",
72
- "x-amz-target": "ComprehendMedical_20181030.DetectPHI",
73
- };
49
+ const headers = sharedHeaders("DetectPHI");
74
50
  let body;
75
51
  body = JSON.stringify(se_DetectPHIRequest(input, context));
76
52
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
53
  };
78
54
  export const se_InferICD10CMCommand = async (input, context) => {
79
- const headers = {
80
- "content-type": "application/x-amz-json-1.1",
81
- "x-amz-target": "ComprehendMedical_20181030.InferICD10CM",
82
- };
55
+ const headers = sharedHeaders("InferICD10CM");
83
56
  let body;
84
57
  body = JSON.stringify(se_InferICD10CMRequest(input, context));
85
58
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
59
  };
87
60
  export const se_InferRxNormCommand = async (input, context) => {
88
- const headers = {
89
- "content-type": "application/x-amz-json-1.1",
90
- "x-amz-target": "ComprehendMedical_20181030.InferRxNorm",
91
- };
61
+ const headers = sharedHeaders("InferRxNorm");
92
62
  let body;
93
63
  body = JSON.stringify(se_InferRxNormRequest(input, context));
94
64
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
65
  };
96
66
  export const se_InferSNOMEDCTCommand = async (input, context) => {
97
- const headers = {
98
- "content-type": "application/x-amz-json-1.1",
99
- "x-amz-target": "ComprehendMedical_20181030.InferSNOMEDCT",
100
- };
67
+ const headers = sharedHeaders("InferSNOMEDCT");
101
68
  let body;
102
69
  body = JSON.stringify(se_InferSNOMEDCTRequest(input, context));
103
70
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
104
71
  };
105
72
  export const se_ListEntitiesDetectionV2JobsCommand = async (input, context) => {
106
- const headers = {
107
- "content-type": "application/x-amz-json-1.1",
108
- "x-amz-target": "ComprehendMedical_20181030.ListEntitiesDetectionV2Jobs",
109
- };
73
+ const headers = sharedHeaders("ListEntitiesDetectionV2Jobs");
110
74
  let body;
111
75
  body = JSON.stringify(se_ListEntitiesDetectionV2JobsRequest(input, context));
112
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
77
  };
114
78
  export const se_ListICD10CMInferenceJobsCommand = async (input, context) => {
115
- const headers = {
116
- "content-type": "application/x-amz-json-1.1",
117
- "x-amz-target": "ComprehendMedical_20181030.ListICD10CMInferenceJobs",
118
- };
79
+ const headers = sharedHeaders("ListICD10CMInferenceJobs");
119
80
  let body;
120
81
  body = JSON.stringify(se_ListICD10CMInferenceJobsRequest(input, context));
121
82
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
122
83
  };
123
84
  export const se_ListPHIDetectionJobsCommand = async (input, context) => {
124
- const headers = {
125
- "content-type": "application/x-amz-json-1.1",
126
- "x-amz-target": "ComprehendMedical_20181030.ListPHIDetectionJobs",
127
- };
85
+ const headers = sharedHeaders("ListPHIDetectionJobs");
128
86
  let body;
129
87
  body = JSON.stringify(se_ListPHIDetectionJobsRequest(input, context));
130
88
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
89
  };
132
90
  export const se_ListRxNormInferenceJobsCommand = async (input, context) => {
133
- const headers = {
134
- "content-type": "application/x-amz-json-1.1",
135
- "x-amz-target": "ComprehendMedical_20181030.ListRxNormInferenceJobs",
136
- };
91
+ const headers = sharedHeaders("ListRxNormInferenceJobs");
137
92
  let body;
138
93
  body = JSON.stringify(se_ListRxNormInferenceJobsRequest(input, context));
139
94
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
95
  };
141
96
  export const se_ListSNOMEDCTInferenceJobsCommand = async (input, context) => {
142
- const headers = {
143
- "content-type": "application/x-amz-json-1.1",
144
- "x-amz-target": "ComprehendMedical_20181030.ListSNOMEDCTInferenceJobs",
145
- };
97
+ const headers = sharedHeaders("ListSNOMEDCTInferenceJobs");
146
98
  let body;
147
99
  body = JSON.stringify(se_ListSNOMEDCTInferenceJobsRequest(input, context));
148
100
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
101
  };
150
102
  export const se_StartEntitiesDetectionV2JobCommand = async (input, context) => {
151
- const headers = {
152
- "content-type": "application/x-amz-json-1.1",
153
- "x-amz-target": "ComprehendMedical_20181030.StartEntitiesDetectionV2Job",
154
- };
103
+ const headers = sharedHeaders("StartEntitiesDetectionV2Job");
155
104
  let body;
156
105
  body = JSON.stringify(se_StartEntitiesDetectionV2JobRequest(input, context));
157
106
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
158
107
  };
159
108
  export const se_StartICD10CMInferenceJobCommand = async (input, context) => {
160
- const headers = {
161
- "content-type": "application/x-amz-json-1.1",
162
- "x-amz-target": "ComprehendMedical_20181030.StartICD10CMInferenceJob",
163
- };
109
+ const headers = sharedHeaders("StartICD10CMInferenceJob");
164
110
  let body;
165
111
  body = JSON.stringify(se_StartICD10CMInferenceJobRequest(input, context));
166
112
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
113
  };
168
114
  export const se_StartPHIDetectionJobCommand = async (input, context) => {
169
- const headers = {
170
- "content-type": "application/x-amz-json-1.1",
171
- "x-amz-target": "ComprehendMedical_20181030.StartPHIDetectionJob",
172
- };
115
+ const headers = sharedHeaders("StartPHIDetectionJob");
173
116
  let body;
174
117
  body = JSON.stringify(se_StartPHIDetectionJobRequest(input, context));
175
118
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
176
119
  };
177
120
  export const se_StartRxNormInferenceJobCommand = async (input, context) => {
178
- const headers = {
179
- "content-type": "application/x-amz-json-1.1",
180
- "x-amz-target": "ComprehendMedical_20181030.StartRxNormInferenceJob",
181
- };
121
+ const headers = sharedHeaders("StartRxNormInferenceJob");
182
122
  let body;
183
123
  body = JSON.stringify(se_StartRxNormInferenceJobRequest(input, context));
184
124
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
185
125
  };
186
126
  export const se_StartSNOMEDCTInferenceJobCommand = async (input, context) => {
187
- const headers = {
188
- "content-type": "application/x-amz-json-1.1",
189
- "x-amz-target": "ComprehendMedical_20181030.StartSNOMEDCTInferenceJob",
190
- };
127
+ const headers = sharedHeaders("StartSNOMEDCTInferenceJob");
191
128
  let body;
192
129
  body = JSON.stringify(se_StartSNOMEDCTInferenceJobRequest(input, context));
193
130
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
194
131
  };
195
132
  export const se_StopEntitiesDetectionV2JobCommand = async (input, context) => {
196
- const headers = {
197
- "content-type": "application/x-amz-json-1.1",
198
- "x-amz-target": "ComprehendMedical_20181030.StopEntitiesDetectionV2Job",
199
- };
133
+ const headers = sharedHeaders("StopEntitiesDetectionV2Job");
200
134
  let body;
201
135
  body = JSON.stringify(se_StopEntitiesDetectionV2JobRequest(input, context));
202
136
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
137
  };
204
138
  export const se_StopICD10CMInferenceJobCommand = async (input, context) => {
205
- const headers = {
206
- "content-type": "application/x-amz-json-1.1",
207
- "x-amz-target": "ComprehendMedical_20181030.StopICD10CMInferenceJob",
208
- };
139
+ const headers = sharedHeaders("StopICD10CMInferenceJob");
209
140
  let body;
210
141
  body = JSON.stringify(se_StopICD10CMInferenceJobRequest(input, context));
211
142
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
212
143
  };
213
144
  export const se_StopPHIDetectionJobCommand = async (input, context) => {
214
- const headers = {
215
- "content-type": "application/x-amz-json-1.1",
216
- "x-amz-target": "ComprehendMedical_20181030.StopPHIDetectionJob",
217
- };
145
+ const headers = sharedHeaders("StopPHIDetectionJob");
218
146
  let body;
219
147
  body = JSON.stringify(se_StopPHIDetectionJobRequest(input, context));
220
148
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
221
149
  };
222
150
  export const se_StopRxNormInferenceJobCommand = async (input, context) => {
223
- const headers = {
224
- "content-type": "application/x-amz-json-1.1",
225
- "x-amz-target": "ComprehendMedical_20181030.StopRxNormInferenceJob",
226
- };
151
+ const headers = sharedHeaders("StopRxNormInferenceJob");
227
152
  let body;
228
153
  body = JSON.stringify(se_StopRxNormInferenceJobRequest(input, context));
229
154
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
230
155
  };
231
156
  export const se_StopSNOMEDCTInferenceJobCommand = async (input, context) => {
232
- const headers = {
233
- "content-type": "application/x-amz-json-1.1",
234
- "x-amz-target": "ComprehendMedical_20181030.StopSNOMEDCTInferenceJob",
235
- };
157
+ const headers = sharedHeaders("StopSNOMEDCTInferenceJob");
236
158
  let body;
237
159
  body = JSON.stringify(se_StopSNOMEDCTInferenceJobRequest(input, context));
238
160
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -2249,6 +2171,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
2249
2171
  }
2250
2172
  return new __HttpRequest(contents);
2251
2173
  };
2174
+ function sharedHeaders(operation) {
2175
+ return {
2176
+ "content-type": "application/x-amz-json-1.1",
2177
+ "x-amz-target": `ComprehendMedical_20181030.${operation}`,
2178
+ };
2179
+ }
2252
2180
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2253
2181
  if (encoded.length) {
2254
2182
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-comprehendmedical",
3
3
  "description": "AWS SDK for JavaScript Comprehendmedical Client for Node.js, Browser and React Native",
4
- "version": "3.310.0",
4
+ "version": "3.312.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",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.310.0",
24
+ "@aws-sdk/client-sts": "3.312.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
26
  "@aws-sdk/credential-provider-node": "3.310.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",