@aws-sdk/client-rekognition 3.309.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.
Files changed (49) hide show
  1. package/README.md +16 -0
  2. package/dist-cjs/Rekognition.js +30 -0
  3. package/dist-cjs/commands/CreateFaceLivenessSessionCommand.js +45 -0
  4. package/dist-cjs/commands/GetFaceLivenessSessionResultsCommand.js +46 -0
  5. package/dist-cjs/commands/index.js +2 -0
  6. package/dist-cjs/endpoint/ruleset.js +3 -3
  7. package/dist-cjs/models/index.js +1 -0
  8. package/dist-cjs/models/models_0.js +36 -2
  9. package/dist-cjs/models/models_1.js +2 -0
  10. package/dist-cjs/protocols/Aws_json1_1.js +256 -255
  11. package/dist-es/Rekognition.js +30 -0
  12. package/dist-es/commands/CreateFaceLivenessSessionCommand.js +41 -0
  13. package/dist-es/commands/GetFaceLivenessSessionResultsCommand.js +42 -0
  14. package/dist-es/commands/index.js +2 -0
  15. package/dist-es/endpoint/ruleset.js +3 -3
  16. package/dist-es/models/index.js +1 -0
  17. package/dist-es/models/models_0.js +31 -0
  18. package/dist-es/models/models_1.js +1 -0
  19. package/dist-es/protocols/Aws_json1_1.js +250 -253
  20. package/dist-types/Rekognition.d.ts +51 -10
  21. package/dist-types/RekognitionClient.d.ts +4 -2
  22. package/dist-types/commands/CopyProjectVersionCommand.d.ts +1 -0
  23. package/dist-types/commands/CreateFaceLivenessSessionCommand.d.ts +94 -0
  24. package/dist-types/commands/CreateStreamProcessorCommand.d.ts +17 -7
  25. package/dist-types/commands/DeleteProjectPolicyCommand.d.ts +1 -0
  26. package/dist-types/commands/DetectLabelsCommand.d.ts +2 -3
  27. package/dist-types/commands/GetFaceLivenessSessionResultsCommand.d.ts +88 -0
  28. package/dist-types/commands/ListProjectPoliciesCommand.d.ts +1 -0
  29. package/dist-types/commands/PutProjectPolicyCommand.d.ts +1 -0
  30. package/dist-types/commands/StopProjectVersionCommand.d.ts +1 -0
  31. package/dist-types/commands/UpdateStreamProcessorCommand.d.ts +4 -1
  32. package/dist-types/commands/index.d.ts +2 -0
  33. package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  34. package/dist-types/models/index.d.ts +1 -0
  35. package/dist-types/models/models_0.d.ts +241 -106
  36. package/dist-types/models/models_1.d.ts +56 -0
  37. package/dist-types/protocols/Aws_json1_1.d.ts +18 -0
  38. package/dist-types/ts3.4/Rekognition.d.ts +34 -0
  39. package/dist-types/ts3.4/RekognitionClient.d.ts +12 -0
  40. package/dist-types/ts3.4/commands/CreateFaceLivenessSessionCommand.d.ts +41 -0
  41. package/dist-types/ts3.4/commands/GetFaceLivenessSessionResultsCommand.d.ts +41 -0
  42. package/dist-types/ts3.4/commands/UpdateStreamProcessorCommand.d.ts +1 -1
  43. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  44. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
  45. package/dist-types/ts3.4/models/index.d.ts +1 -0
  46. package/dist-types/ts3.4/models/models_0.d.ts +59 -17
  47. package/dist-types/ts3.4/models/models_1.d.ts +17 -0
  48. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +24 -0
  49. package/package.json +36 -36
@@ -1,637 +1,462 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.se_StartFaceDetectionCommand = exports.se_StartContentModerationCommand = exports.se_StartCelebrityRecognitionCommand = exports.se_SearchFacesByImageCommand = exports.se_SearchFacesCommand = exports.se_RecognizeCelebritiesCommand = exports.se_PutProjectPolicyCommand = exports.se_ListTagsForResourceCommand = exports.se_ListStreamProcessorsCommand = exports.se_ListProjectPoliciesCommand = exports.se_ListFacesCommand = exports.se_ListDatasetLabelsCommand = exports.se_ListDatasetEntriesCommand = exports.se_ListCollectionsCommand = exports.se_IndexFacesCommand = exports.se_GetTextDetectionCommand = exports.se_GetSegmentDetectionCommand = exports.se_GetPersonTrackingCommand = exports.se_GetLabelDetectionCommand = exports.se_GetFaceSearchCommand = exports.se_GetFaceDetectionCommand = exports.se_GetContentModerationCommand = exports.se_GetCelebrityRecognitionCommand = exports.se_GetCelebrityInfoCommand = exports.se_DistributeDatasetEntriesCommand = exports.se_DetectTextCommand = exports.se_DetectProtectiveEquipmentCommand = exports.se_DetectModerationLabelsCommand = exports.se_DetectLabelsCommand = exports.se_DetectFacesCommand = exports.se_DetectCustomLabelsCommand = exports.se_DescribeStreamProcessorCommand = exports.se_DescribeProjectVersionsCommand = exports.se_DescribeProjectsCommand = exports.se_DescribeDatasetCommand = exports.se_DescribeCollectionCommand = exports.se_DeleteStreamProcessorCommand = exports.se_DeleteProjectVersionCommand = exports.se_DeleteProjectPolicyCommand = exports.se_DeleteProjectCommand = exports.se_DeleteFacesCommand = exports.se_DeleteDatasetCommand = exports.se_DeleteCollectionCommand = exports.se_CreateStreamProcessorCommand = exports.se_CreateProjectVersionCommand = exports.se_CreateProjectCommand = exports.se_CreateDatasetCommand = exports.se_CreateCollectionCommand = exports.se_CopyProjectVersionCommand = exports.se_CompareFacesCommand = void 0;
4
- exports.de_ListCollectionsCommand = exports.de_IndexFacesCommand = exports.de_GetTextDetectionCommand = exports.de_GetSegmentDetectionCommand = exports.de_GetPersonTrackingCommand = exports.de_GetLabelDetectionCommand = exports.de_GetFaceSearchCommand = exports.de_GetFaceDetectionCommand = exports.de_GetContentModerationCommand = exports.de_GetCelebrityRecognitionCommand = exports.de_GetCelebrityInfoCommand = exports.de_DistributeDatasetEntriesCommand = exports.de_DetectTextCommand = exports.de_DetectProtectiveEquipmentCommand = exports.de_DetectModerationLabelsCommand = exports.de_DetectLabelsCommand = exports.de_DetectFacesCommand = exports.de_DetectCustomLabelsCommand = exports.de_DescribeStreamProcessorCommand = exports.de_DescribeProjectVersionsCommand = exports.de_DescribeProjectsCommand = exports.de_DescribeDatasetCommand = exports.de_DescribeCollectionCommand = exports.de_DeleteStreamProcessorCommand = exports.de_DeleteProjectVersionCommand = exports.de_DeleteProjectPolicyCommand = exports.de_DeleteProjectCommand = exports.de_DeleteFacesCommand = exports.de_DeleteDatasetCommand = exports.de_DeleteCollectionCommand = exports.de_CreateStreamProcessorCommand = exports.de_CreateProjectVersionCommand = exports.de_CreateProjectCommand = exports.de_CreateDatasetCommand = exports.de_CreateCollectionCommand = exports.de_CopyProjectVersionCommand = exports.de_CompareFacesCommand = exports.se_UpdateStreamProcessorCommand = exports.se_UpdateDatasetEntriesCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopStreamProcessorCommand = exports.se_StopProjectVersionCommand = exports.se_StartTextDetectionCommand = exports.se_StartStreamProcessorCommand = exports.se_StartSegmentDetectionCommand = exports.se_StartProjectVersionCommand = exports.se_StartPersonTrackingCommand = exports.se_StartLabelDetectionCommand = exports.se_StartFaceSearchCommand = void 0;
5
- exports.de_UpdateStreamProcessorCommand = exports.de_UpdateDatasetEntriesCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopStreamProcessorCommand = exports.de_StopProjectVersionCommand = exports.de_StartTextDetectionCommand = exports.de_StartStreamProcessorCommand = exports.de_StartSegmentDetectionCommand = exports.de_StartProjectVersionCommand = exports.de_StartPersonTrackingCommand = exports.de_StartLabelDetectionCommand = exports.de_StartFaceSearchCommand = exports.de_StartFaceDetectionCommand = exports.de_StartContentModerationCommand = exports.de_StartCelebrityRecognitionCommand = exports.de_SearchFacesByImageCommand = exports.de_SearchFacesCommand = exports.de_RecognizeCelebritiesCommand = exports.de_PutProjectPolicyCommand = exports.de_ListTagsForResourceCommand = exports.de_ListStreamProcessorsCommand = exports.de_ListProjectPoliciesCommand = exports.de_ListFacesCommand = exports.de_ListDatasetLabelsCommand = exports.de_ListDatasetEntriesCommand = void 0;
3
+ exports.se_StartCelebrityRecognitionCommand = exports.se_SearchFacesByImageCommand = exports.se_SearchFacesCommand = exports.se_RecognizeCelebritiesCommand = exports.se_PutProjectPolicyCommand = exports.se_ListTagsForResourceCommand = exports.se_ListStreamProcessorsCommand = exports.se_ListProjectPoliciesCommand = exports.se_ListFacesCommand = exports.se_ListDatasetLabelsCommand = exports.se_ListDatasetEntriesCommand = exports.se_ListCollectionsCommand = exports.se_IndexFacesCommand = exports.se_GetTextDetectionCommand = exports.se_GetSegmentDetectionCommand = exports.se_GetPersonTrackingCommand = exports.se_GetLabelDetectionCommand = exports.se_GetFaceSearchCommand = exports.se_GetFaceLivenessSessionResultsCommand = exports.se_GetFaceDetectionCommand = exports.se_GetContentModerationCommand = exports.se_GetCelebrityRecognitionCommand = exports.se_GetCelebrityInfoCommand = exports.se_DistributeDatasetEntriesCommand = exports.se_DetectTextCommand = exports.se_DetectProtectiveEquipmentCommand = exports.se_DetectModerationLabelsCommand = exports.se_DetectLabelsCommand = exports.se_DetectFacesCommand = exports.se_DetectCustomLabelsCommand = exports.se_DescribeStreamProcessorCommand = exports.se_DescribeProjectVersionsCommand = exports.se_DescribeProjectsCommand = exports.se_DescribeDatasetCommand = exports.se_DescribeCollectionCommand = exports.se_DeleteStreamProcessorCommand = exports.se_DeleteProjectVersionCommand = exports.se_DeleteProjectPolicyCommand = exports.se_DeleteProjectCommand = exports.se_DeleteFacesCommand = exports.se_DeleteDatasetCommand = exports.se_DeleteCollectionCommand = exports.se_CreateStreamProcessorCommand = exports.se_CreateProjectVersionCommand = exports.se_CreateProjectCommand = exports.se_CreateFaceLivenessSessionCommand = exports.se_CreateDatasetCommand = exports.se_CreateCollectionCommand = exports.se_CopyProjectVersionCommand = exports.se_CompareFacesCommand = void 0;
4
+ exports.de_GetPersonTrackingCommand = exports.de_GetLabelDetectionCommand = exports.de_GetFaceSearchCommand = exports.de_GetFaceLivenessSessionResultsCommand = exports.de_GetFaceDetectionCommand = exports.de_GetContentModerationCommand = exports.de_GetCelebrityRecognitionCommand = exports.de_GetCelebrityInfoCommand = exports.de_DistributeDatasetEntriesCommand = exports.de_DetectTextCommand = exports.de_DetectProtectiveEquipmentCommand = exports.de_DetectModerationLabelsCommand = exports.de_DetectLabelsCommand = exports.de_DetectFacesCommand = exports.de_DetectCustomLabelsCommand = exports.de_DescribeStreamProcessorCommand = exports.de_DescribeProjectVersionsCommand = exports.de_DescribeProjectsCommand = exports.de_DescribeDatasetCommand = exports.de_DescribeCollectionCommand = exports.de_DeleteStreamProcessorCommand = exports.de_DeleteProjectVersionCommand = exports.de_DeleteProjectPolicyCommand = exports.de_DeleteProjectCommand = exports.de_DeleteFacesCommand = exports.de_DeleteDatasetCommand = exports.de_DeleteCollectionCommand = exports.de_CreateStreamProcessorCommand = exports.de_CreateProjectVersionCommand = exports.de_CreateProjectCommand = exports.de_CreateFaceLivenessSessionCommand = exports.de_CreateDatasetCommand = exports.de_CreateCollectionCommand = exports.de_CopyProjectVersionCommand = exports.de_CompareFacesCommand = exports.se_UpdateStreamProcessorCommand = exports.se_UpdateDatasetEntriesCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopStreamProcessorCommand = exports.se_StopProjectVersionCommand = exports.se_StartTextDetectionCommand = exports.se_StartStreamProcessorCommand = exports.se_StartSegmentDetectionCommand = exports.se_StartProjectVersionCommand = exports.se_StartPersonTrackingCommand = exports.se_StartLabelDetectionCommand = exports.se_StartFaceSearchCommand = exports.se_StartFaceDetectionCommand = exports.se_StartContentModerationCommand = void 0;
5
+ exports.de_UpdateStreamProcessorCommand = exports.de_UpdateDatasetEntriesCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopStreamProcessorCommand = exports.de_StopProjectVersionCommand = exports.de_StartTextDetectionCommand = exports.de_StartStreamProcessorCommand = exports.de_StartSegmentDetectionCommand = exports.de_StartProjectVersionCommand = exports.de_StartPersonTrackingCommand = exports.de_StartLabelDetectionCommand = exports.de_StartFaceSearchCommand = exports.de_StartFaceDetectionCommand = exports.de_StartContentModerationCommand = exports.de_StartCelebrityRecognitionCommand = exports.de_SearchFacesByImageCommand = exports.de_SearchFacesCommand = exports.de_RecognizeCelebritiesCommand = exports.de_PutProjectPolicyCommand = exports.de_ListTagsForResourceCommand = exports.de_ListStreamProcessorsCommand = exports.de_ListProjectPoliciesCommand = exports.de_ListFacesCommand = exports.de_ListDatasetLabelsCommand = exports.de_ListDatasetEntriesCommand = exports.de_ListCollectionsCommand = exports.de_IndexFacesCommand = exports.de_GetTextDetectionCommand = exports.de_GetSegmentDetectionCommand = void 0;
6
6
  const protocol_http_1 = require("@aws-sdk/protocol-http");
7
7
  const smithy_client_1 = require("@aws-sdk/smithy-client");
8
8
  const models_0_1 = require("../models/models_0");
9
9
  const RekognitionServiceException_1 = require("../models/RekognitionServiceException");
10
10
  const se_CompareFacesCommand = async (input, context) => {
11
- const headers = {
12
- "content-type": "application/x-amz-json-1.1",
13
- "x-amz-target": "RekognitionService.CompareFaces",
14
- };
11
+ const headers = sharedHeaders("CompareFaces");
15
12
  let body;
16
13
  body = JSON.stringify(se_CompareFacesRequest(input, context));
17
14
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
18
15
  };
19
16
  exports.se_CompareFacesCommand = se_CompareFacesCommand;
20
17
  const se_CopyProjectVersionCommand = async (input, context) => {
21
- const headers = {
22
- "content-type": "application/x-amz-json-1.1",
23
- "x-amz-target": "RekognitionService.CopyProjectVersion",
24
- };
18
+ const headers = sharedHeaders("CopyProjectVersion");
25
19
  let body;
26
20
  body = JSON.stringify(se_CopyProjectVersionRequest(input, context));
27
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
22
  };
29
23
  exports.se_CopyProjectVersionCommand = se_CopyProjectVersionCommand;
30
24
  const se_CreateCollectionCommand = async (input, context) => {
31
- const headers = {
32
- "content-type": "application/x-amz-json-1.1",
33
- "x-amz-target": "RekognitionService.CreateCollection",
34
- };
25
+ const headers = sharedHeaders("CreateCollection");
35
26
  let body;
36
27
  body = JSON.stringify(se_CreateCollectionRequest(input, context));
37
28
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
38
29
  };
39
30
  exports.se_CreateCollectionCommand = se_CreateCollectionCommand;
40
31
  const se_CreateDatasetCommand = async (input, context) => {
41
- const headers = {
42
- "content-type": "application/x-amz-json-1.1",
43
- "x-amz-target": "RekognitionService.CreateDataset",
44
- };
32
+ const headers = sharedHeaders("CreateDataset");
45
33
  let body;
46
34
  body = JSON.stringify(se_CreateDatasetRequest(input, context));
47
35
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
36
  };
49
37
  exports.se_CreateDatasetCommand = se_CreateDatasetCommand;
38
+ const se_CreateFaceLivenessSessionCommand = async (input, context) => {
39
+ const headers = sharedHeaders("CreateFaceLivenessSession");
40
+ let body;
41
+ body = JSON.stringify(se_CreateFaceLivenessSessionRequest(input, context));
42
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
43
+ };
44
+ exports.se_CreateFaceLivenessSessionCommand = se_CreateFaceLivenessSessionCommand;
50
45
  const se_CreateProjectCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.1",
53
- "x-amz-target": "RekognitionService.CreateProject",
54
- };
46
+ const headers = sharedHeaders("CreateProject");
55
47
  let body;
56
48
  body = JSON.stringify(se_CreateProjectRequest(input, context));
57
49
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
50
  };
59
51
  exports.se_CreateProjectCommand = se_CreateProjectCommand;
60
52
  const se_CreateProjectVersionCommand = async (input, context) => {
61
- const headers = {
62
- "content-type": "application/x-amz-json-1.1",
63
- "x-amz-target": "RekognitionService.CreateProjectVersion",
64
- };
53
+ const headers = sharedHeaders("CreateProjectVersion");
65
54
  let body;
66
55
  body = JSON.stringify(se_CreateProjectVersionRequest(input, context));
67
56
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
68
57
  };
69
58
  exports.se_CreateProjectVersionCommand = se_CreateProjectVersionCommand;
70
59
  const se_CreateStreamProcessorCommand = async (input, context) => {
71
- const headers = {
72
- "content-type": "application/x-amz-json-1.1",
73
- "x-amz-target": "RekognitionService.CreateStreamProcessor",
74
- };
60
+ const headers = sharedHeaders("CreateStreamProcessor");
75
61
  let body;
76
62
  body = JSON.stringify(se_CreateStreamProcessorRequest(input, context));
77
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
78
64
  };
79
65
  exports.se_CreateStreamProcessorCommand = se_CreateStreamProcessorCommand;
80
66
  const se_DeleteCollectionCommand = async (input, context) => {
81
- const headers = {
82
- "content-type": "application/x-amz-json-1.1",
83
- "x-amz-target": "RekognitionService.DeleteCollection",
84
- };
67
+ const headers = sharedHeaders("DeleteCollection");
85
68
  let body;
86
69
  body = JSON.stringify(se_DeleteCollectionRequest(input, context));
87
70
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
88
71
  };
89
72
  exports.se_DeleteCollectionCommand = se_DeleteCollectionCommand;
90
73
  const se_DeleteDatasetCommand = async (input, context) => {
91
- const headers = {
92
- "content-type": "application/x-amz-json-1.1",
93
- "x-amz-target": "RekognitionService.DeleteDataset",
94
- };
74
+ const headers = sharedHeaders("DeleteDataset");
95
75
  let body;
96
76
  body = JSON.stringify(se_DeleteDatasetRequest(input, context));
97
77
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
98
78
  };
99
79
  exports.se_DeleteDatasetCommand = se_DeleteDatasetCommand;
100
80
  const se_DeleteFacesCommand = async (input, context) => {
101
- const headers = {
102
- "content-type": "application/x-amz-json-1.1",
103
- "x-amz-target": "RekognitionService.DeleteFaces",
104
- };
81
+ const headers = sharedHeaders("DeleteFaces");
105
82
  let body;
106
83
  body = JSON.stringify(se_DeleteFacesRequest(input, context));
107
84
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
108
85
  };
109
86
  exports.se_DeleteFacesCommand = se_DeleteFacesCommand;
110
87
  const se_DeleteProjectCommand = async (input, context) => {
111
- const headers = {
112
- "content-type": "application/x-amz-json-1.1",
113
- "x-amz-target": "RekognitionService.DeleteProject",
114
- };
88
+ const headers = sharedHeaders("DeleteProject");
115
89
  let body;
116
90
  body = JSON.stringify(se_DeleteProjectRequest(input, context));
117
91
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
118
92
  };
119
93
  exports.se_DeleteProjectCommand = se_DeleteProjectCommand;
120
94
  const se_DeleteProjectPolicyCommand = async (input, context) => {
121
- const headers = {
122
- "content-type": "application/x-amz-json-1.1",
123
- "x-amz-target": "RekognitionService.DeleteProjectPolicy",
124
- };
95
+ const headers = sharedHeaders("DeleteProjectPolicy");
125
96
  let body;
126
97
  body = JSON.stringify(se_DeleteProjectPolicyRequest(input, context));
127
98
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
128
99
  };
129
100
  exports.se_DeleteProjectPolicyCommand = se_DeleteProjectPolicyCommand;
130
101
  const se_DeleteProjectVersionCommand = async (input, context) => {
131
- const headers = {
132
- "content-type": "application/x-amz-json-1.1",
133
- "x-amz-target": "RekognitionService.DeleteProjectVersion",
134
- };
102
+ const headers = sharedHeaders("DeleteProjectVersion");
135
103
  let body;
136
104
  body = JSON.stringify(se_DeleteProjectVersionRequest(input, context));
137
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
138
106
  };
139
107
  exports.se_DeleteProjectVersionCommand = se_DeleteProjectVersionCommand;
140
108
  const se_DeleteStreamProcessorCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "RekognitionService.DeleteStreamProcessor",
144
- };
109
+ const headers = sharedHeaders("DeleteStreamProcessor");
145
110
  let body;
146
111
  body = JSON.stringify(se_DeleteStreamProcessorRequest(input, context));
147
112
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
113
  };
149
114
  exports.se_DeleteStreamProcessorCommand = se_DeleteStreamProcessorCommand;
150
115
  const se_DescribeCollectionCommand = async (input, context) => {
151
- const headers = {
152
- "content-type": "application/x-amz-json-1.1",
153
- "x-amz-target": "RekognitionService.DescribeCollection",
154
- };
116
+ const headers = sharedHeaders("DescribeCollection");
155
117
  let body;
156
118
  body = JSON.stringify(se_DescribeCollectionRequest(input, context));
157
119
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
158
120
  };
159
121
  exports.se_DescribeCollectionCommand = se_DescribeCollectionCommand;
160
122
  const se_DescribeDatasetCommand = async (input, context) => {
161
- const headers = {
162
- "content-type": "application/x-amz-json-1.1",
163
- "x-amz-target": "RekognitionService.DescribeDataset",
164
- };
123
+ const headers = sharedHeaders("DescribeDataset");
165
124
  let body;
166
125
  body = JSON.stringify(se_DescribeDatasetRequest(input, context));
167
126
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
127
  };
169
128
  exports.se_DescribeDatasetCommand = se_DescribeDatasetCommand;
170
129
  const se_DescribeProjectsCommand = async (input, context) => {
171
- const headers = {
172
- "content-type": "application/x-amz-json-1.1",
173
- "x-amz-target": "RekognitionService.DescribeProjects",
174
- };
130
+ const headers = sharedHeaders("DescribeProjects");
175
131
  let body;
176
132
  body = JSON.stringify(se_DescribeProjectsRequest(input, context));
177
133
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
178
134
  };
179
135
  exports.se_DescribeProjectsCommand = se_DescribeProjectsCommand;
180
136
  const se_DescribeProjectVersionsCommand = async (input, context) => {
181
- const headers = {
182
- "content-type": "application/x-amz-json-1.1",
183
- "x-amz-target": "RekognitionService.DescribeProjectVersions",
184
- };
137
+ const headers = sharedHeaders("DescribeProjectVersions");
185
138
  let body;
186
139
  body = JSON.stringify(se_DescribeProjectVersionsRequest(input, context));
187
140
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
188
141
  };
189
142
  exports.se_DescribeProjectVersionsCommand = se_DescribeProjectVersionsCommand;
190
143
  const se_DescribeStreamProcessorCommand = async (input, context) => {
191
- const headers = {
192
- "content-type": "application/x-amz-json-1.1",
193
- "x-amz-target": "RekognitionService.DescribeStreamProcessor",
194
- };
144
+ const headers = sharedHeaders("DescribeStreamProcessor");
195
145
  let body;
196
146
  body = JSON.stringify(se_DescribeStreamProcessorRequest(input, context));
197
147
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
198
148
  };
199
149
  exports.se_DescribeStreamProcessorCommand = se_DescribeStreamProcessorCommand;
200
150
  const se_DetectCustomLabelsCommand = async (input, context) => {
201
- const headers = {
202
- "content-type": "application/x-amz-json-1.1",
203
- "x-amz-target": "RekognitionService.DetectCustomLabels",
204
- };
151
+ const headers = sharedHeaders("DetectCustomLabels");
205
152
  let body;
206
153
  body = JSON.stringify(se_DetectCustomLabelsRequest(input, context));
207
154
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
208
155
  };
209
156
  exports.se_DetectCustomLabelsCommand = se_DetectCustomLabelsCommand;
210
157
  const se_DetectFacesCommand = async (input, context) => {
211
- const headers = {
212
- "content-type": "application/x-amz-json-1.1",
213
- "x-amz-target": "RekognitionService.DetectFaces",
214
- };
158
+ const headers = sharedHeaders("DetectFaces");
215
159
  let body;
216
160
  body = JSON.stringify(se_DetectFacesRequest(input, context));
217
161
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
218
162
  };
219
163
  exports.se_DetectFacesCommand = se_DetectFacesCommand;
220
164
  const se_DetectLabelsCommand = async (input, context) => {
221
- const headers = {
222
- "content-type": "application/x-amz-json-1.1",
223
- "x-amz-target": "RekognitionService.DetectLabels",
224
- };
165
+ const headers = sharedHeaders("DetectLabels");
225
166
  let body;
226
167
  body = JSON.stringify(se_DetectLabelsRequest(input, context));
227
168
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
228
169
  };
229
170
  exports.se_DetectLabelsCommand = se_DetectLabelsCommand;
230
171
  const se_DetectModerationLabelsCommand = async (input, context) => {
231
- const headers = {
232
- "content-type": "application/x-amz-json-1.1",
233
- "x-amz-target": "RekognitionService.DetectModerationLabels",
234
- };
172
+ const headers = sharedHeaders("DetectModerationLabels");
235
173
  let body;
236
174
  body = JSON.stringify(se_DetectModerationLabelsRequest(input, context));
237
175
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
238
176
  };
239
177
  exports.se_DetectModerationLabelsCommand = se_DetectModerationLabelsCommand;
240
178
  const se_DetectProtectiveEquipmentCommand = async (input, context) => {
241
- const headers = {
242
- "content-type": "application/x-amz-json-1.1",
243
- "x-amz-target": "RekognitionService.DetectProtectiveEquipment",
244
- };
179
+ const headers = sharedHeaders("DetectProtectiveEquipment");
245
180
  let body;
246
181
  body = JSON.stringify(se_DetectProtectiveEquipmentRequest(input, context));
247
182
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
248
183
  };
249
184
  exports.se_DetectProtectiveEquipmentCommand = se_DetectProtectiveEquipmentCommand;
250
185
  const se_DetectTextCommand = async (input, context) => {
251
- const headers = {
252
- "content-type": "application/x-amz-json-1.1",
253
- "x-amz-target": "RekognitionService.DetectText",
254
- };
186
+ const headers = sharedHeaders("DetectText");
255
187
  let body;
256
188
  body = JSON.stringify(se_DetectTextRequest(input, context));
257
189
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
258
190
  };
259
191
  exports.se_DetectTextCommand = se_DetectTextCommand;
260
192
  const se_DistributeDatasetEntriesCommand = async (input, context) => {
261
- const headers = {
262
- "content-type": "application/x-amz-json-1.1",
263
- "x-amz-target": "RekognitionService.DistributeDatasetEntries",
264
- };
193
+ const headers = sharedHeaders("DistributeDatasetEntries");
265
194
  let body;
266
195
  body = JSON.stringify(se_DistributeDatasetEntriesRequest(input, context));
267
196
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
268
197
  };
269
198
  exports.se_DistributeDatasetEntriesCommand = se_DistributeDatasetEntriesCommand;
270
199
  const se_GetCelebrityInfoCommand = async (input, context) => {
271
- const headers = {
272
- "content-type": "application/x-amz-json-1.1",
273
- "x-amz-target": "RekognitionService.GetCelebrityInfo",
274
- };
200
+ const headers = sharedHeaders("GetCelebrityInfo");
275
201
  let body;
276
202
  body = JSON.stringify(se_GetCelebrityInfoRequest(input, context));
277
203
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
278
204
  };
279
205
  exports.se_GetCelebrityInfoCommand = se_GetCelebrityInfoCommand;
280
206
  const se_GetCelebrityRecognitionCommand = async (input, context) => {
281
- const headers = {
282
- "content-type": "application/x-amz-json-1.1",
283
- "x-amz-target": "RekognitionService.GetCelebrityRecognition",
284
- };
207
+ const headers = sharedHeaders("GetCelebrityRecognition");
285
208
  let body;
286
209
  body = JSON.stringify(se_GetCelebrityRecognitionRequest(input, context));
287
210
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
288
211
  };
289
212
  exports.se_GetCelebrityRecognitionCommand = se_GetCelebrityRecognitionCommand;
290
213
  const se_GetContentModerationCommand = async (input, context) => {
291
- const headers = {
292
- "content-type": "application/x-amz-json-1.1",
293
- "x-amz-target": "RekognitionService.GetContentModeration",
294
- };
214
+ const headers = sharedHeaders("GetContentModeration");
295
215
  let body;
296
216
  body = JSON.stringify(se_GetContentModerationRequest(input, context));
297
217
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
298
218
  };
299
219
  exports.se_GetContentModerationCommand = se_GetContentModerationCommand;
300
220
  const se_GetFaceDetectionCommand = async (input, context) => {
301
- const headers = {
302
- "content-type": "application/x-amz-json-1.1",
303
- "x-amz-target": "RekognitionService.GetFaceDetection",
304
- };
221
+ const headers = sharedHeaders("GetFaceDetection");
305
222
  let body;
306
223
  body = JSON.stringify(se_GetFaceDetectionRequest(input, context));
307
224
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
308
225
  };
309
226
  exports.se_GetFaceDetectionCommand = se_GetFaceDetectionCommand;
227
+ const se_GetFaceLivenessSessionResultsCommand = async (input, context) => {
228
+ const headers = sharedHeaders("GetFaceLivenessSessionResults");
229
+ let body;
230
+ body = JSON.stringify(se_GetFaceLivenessSessionResultsRequest(input, context));
231
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
232
+ };
233
+ exports.se_GetFaceLivenessSessionResultsCommand = se_GetFaceLivenessSessionResultsCommand;
310
234
  const se_GetFaceSearchCommand = async (input, context) => {
311
- const headers = {
312
- "content-type": "application/x-amz-json-1.1",
313
- "x-amz-target": "RekognitionService.GetFaceSearch",
314
- };
235
+ const headers = sharedHeaders("GetFaceSearch");
315
236
  let body;
316
237
  body = JSON.stringify(se_GetFaceSearchRequest(input, context));
317
238
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
318
239
  };
319
240
  exports.se_GetFaceSearchCommand = se_GetFaceSearchCommand;
320
241
  const se_GetLabelDetectionCommand = async (input, context) => {
321
- const headers = {
322
- "content-type": "application/x-amz-json-1.1",
323
- "x-amz-target": "RekognitionService.GetLabelDetection",
324
- };
242
+ const headers = sharedHeaders("GetLabelDetection");
325
243
  let body;
326
244
  body = JSON.stringify(se_GetLabelDetectionRequest(input, context));
327
245
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
328
246
  };
329
247
  exports.se_GetLabelDetectionCommand = se_GetLabelDetectionCommand;
330
248
  const se_GetPersonTrackingCommand = async (input, context) => {
331
- const headers = {
332
- "content-type": "application/x-amz-json-1.1",
333
- "x-amz-target": "RekognitionService.GetPersonTracking",
334
- };
249
+ const headers = sharedHeaders("GetPersonTracking");
335
250
  let body;
336
251
  body = JSON.stringify(se_GetPersonTrackingRequest(input, context));
337
252
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
338
253
  };
339
254
  exports.se_GetPersonTrackingCommand = se_GetPersonTrackingCommand;
340
255
  const se_GetSegmentDetectionCommand = async (input, context) => {
341
- const headers = {
342
- "content-type": "application/x-amz-json-1.1",
343
- "x-amz-target": "RekognitionService.GetSegmentDetection",
344
- };
256
+ const headers = sharedHeaders("GetSegmentDetection");
345
257
  let body;
346
258
  body = JSON.stringify(se_GetSegmentDetectionRequest(input, context));
347
259
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
348
260
  };
349
261
  exports.se_GetSegmentDetectionCommand = se_GetSegmentDetectionCommand;
350
262
  const se_GetTextDetectionCommand = async (input, context) => {
351
- const headers = {
352
- "content-type": "application/x-amz-json-1.1",
353
- "x-amz-target": "RekognitionService.GetTextDetection",
354
- };
263
+ const headers = sharedHeaders("GetTextDetection");
355
264
  let body;
356
265
  body = JSON.stringify(se_GetTextDetectionRequest(input, context));
357
266
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
358
267
  };
359
268
  exports.se_GetTextDetectionCommand = se_GetTextDetectionCommand;
360
269
  const se_IndexFacesCommand = async (input, context) => {
361
- const headers = {
362
- "content-type": "application/x-amz-json-1.1",
363
- "x-amz-target": "RekognitionService.IndexFaces",
364
- };
270
+ const headers = sharedHeaders("IndexFaces");
365
271
  let body;
366
272
  body = JSON.stringify(se_IndexFacesRequest(input, context));
367
273
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
368
274
  };
369
275
  exports.se_IndexFacesCommand = se_IndexFacesCommand;
370
276
  const se_ListCollectionsCommand = async (input, context) => {
371
- const headers = {
372
- "content-type": "application/x-amz-json-1.1",
373
- "x-amz-target": "RekognitionService.ListCollections",
374
- };
277
+ const headers = sharedHeaders("ListCollections");
375
278
  let body;
376
279
  body = JSON.stringify(se_ListCollectionsRequest(input, context));
377
280
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
378
281
  };
379
282
  exports.se_ListCollectionsCommand = se_ListCollectionsCommand;
380
283
  const se_ListDatasetEntriesCommand = async (input, context) => {
381
- const headers = {
382
- "content-type": "application/x-amz-json-1.1",
383
- "x-amz-target": "RekognitionService.ListDatasetEntries",
384
- };
284
+ const headers = sharedHeaders("ListDatasetEntries");
385
285
  let body;
386
286
  body = JSON.stringify(se_ListDatasetEntriesRequest(input, context));
387
287
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
388
288
  };
389
289
  exports.se_ListDatasetEntriesCommand = se_ListDatasetEntriesCommand;
390
290
  const se_ListDatasetLabelsCommand = async (input, context) => {
391
- const headers = {
392
- "content-type": "application/x-amz-json-1.1",
393
- "x-amz-target": "RekognitionService.ListDatasetLabels",
394
- };
291
+ const headers = sharedHeaders("ListDatasetLabels");
395
292
  let body;
396
293
  body = JSON.stringify(se_ListDatasetLabelsRequest(input, context));
397
294
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
398
295
  };
399
296
  exports.se_ListDatasetLabelsCommand = se_ListDatasetLabelsCommand;
400
297
  const se_ListFacesCommand = async (input, context) => {
401
- const headers = {
402
- "content-type": "application/x-amz-json-1.1",
403
- "x-amz-target": "RekognitionService.ListFaces",
404
- };
298
+ const headers = sharedHeaders("ListFaces");
405
299
  let body;
406
300
  body = JSON.stringify(se_ListFacesRequest(input, context));
407
301
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
408
302
  };
409
303
  exports.se_ListFacesCommand = se_ListFacesCommand;
410
304
  const se_ListProjectPoliciesCommand = async (input, context) => {
411
- const headers = {
412
- "content-type": "application/x-amz-json-1.1",
413
- "x-amz-target": "RekognitionService.ListProjectPolicies",
414
- };
305
+ const headers = sharedHeaders("ListProjectPolicies");
415
306
  let body;
416
307
  body = JSON.stringify(se_ListProjectPoliciesRequest(input, context));
417
308
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
418
309
  };
419
310
  exports.se_ListProjectPoliciesCommand = se_ListProjectPoliciesCommand;
420
311
  const se_ListStreamProcessorsCommand = async (input, context) => {
421
- const headers = {
422
- "content-type": "application/x-amz-json-1.1",
423
- "x-amz-target": "RekognitionService.ListStreamProcessors",
424
- };
312
+ const headers = sharedHeaders("ListStreamProcessors");
425
313
  let body;
426
314
  body = JSON.stringify(se_ListStreamProcessorsRequest(input, context));
427
315
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
428
316
  };
429
317
  exports.se_ListStreamProcessorsCommand = se_ListStreamProcessorsCommand;
430
318
  const se_ListTagsForResourceCommand = async (input, context) => {
431
- const headers = {
432
- "content-type": "application/x-amz-json-1.1",
433
- "x-amz-target": "RekognitionService.ListTagsForResource",
434
- };
319
+ const headers = sharedHeaders("ListTagsForResource");
435
320
  let body;
436
321
  body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
437
322
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
438
323
  };
439
324
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
440
325
  const se_PutProjectPolicyCommand = async (input, context) => {
441
- const headers = {
442
- "content-type": "application/x-amz-json-1.1",
443
- "x-amz-target": "RekognitionService.PutProjectPolicy",
444
- };
326
+ const headers = sharedHeaders("PutProjectPolicy");
445
327
  let body;
446
328
  body = JSON.stringify(se_PutProjectPolicyRequest(input, context));
447
329
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
448
330
  };
449
331
  exports.se_PutProjectPolicyCommand = se_PutProjectPolicyCommand;
450
332
  const se_RecognizeCelebritiesCommand = async (input, context) => {
451
- const headers = {
452
- "content-type": "application/x-amz-json-1.1",
453
- "x-amz-target": "RekognitionService.RecognizeCelebrities",
454
- };
333
+ const headers = sharedHeaders("RecognizeCelebrities");
455
334
  let body;
456
335
  body = JSON.stringify(se_RecognizeCelebritiesRequest(input, context));
457
336
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
458
337
  };
459
338
  exports.se_RecognizeCelebritiesCommand = se_RecognizeCelebritiesCommand;
460
339
  const se_SearchFacesCommand = async (input, context) => {
461
- const headers = {
462
- "content-type": "application/x-amz-json-1.1",
463
- "x-amz-target": "RekognitionService.SearchFaces",
464
- };
340
+ const headers = sharedHeaders("SearchFaces");
465
341
  let body;
466
342
  body = JSON.stringify(se_SearchFacesRequest(input, context));
467
343
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
468
344
  };
469
345
  exports.se_SearchFacesCommand = se_SearchFacesCommand;
470
346
  const se_SearchFacesByImageCommand = async (input, context) => {
471
- const headers = {
472
- "content-type": "application/x-amz-json-1.1",
473
- "x-amz-target": "RekognitionService.SearchFacesByImage",
474
- };
347
+ const headers = sharedHeaders("SearchFacesByImage");
475
348
  let body;
476
349
  body = JSON.stringify(se_SearchFacesByImageRequest(input, context));
477
350
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
478
351
  };
479
352
  exports.se_SearchFacesByImageCommand = se_SearchFacesByImageCommand;
480
353
  const se_StartCelebrityRecognitionCommand = async (input, context) => {
481
- const headers = {
482
- "content-type": "application/x-amz-json-1.1",
483
- "x-amz-target": "RekognitionService.StartCelebrityRecognition",
484
- };
354
+ const headers = sharedHeaders("StartCelebrityRecognition");
485
355
  let body;
486
356
  body = JSON.stringify(se_StartCelebrityRecognitionRequest(input, context));
487
357
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
488
358
  };
489
359
  exports.se_StartCelebrityRecognitionCommand = se_StartCelebrityRecognitionCommand;
490
360
  const se_StartContentModerationCommand = async (input, context) => {
491
- const headers = {
492
- "content-type": "application/x-amz-json-1.1",
493
- "x-amz-target": "RekognitionService.StartContentModeration",
494
- };
361
+ const headers = sharedHeaders("StartContentModeration");
495
362
  let body;
496
363
  body = JSON.stringify(se_StartContentModerationRequest(input, context));
497
364
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
498
365
  };
499
366
  exports.se_StartContentModerationCommand = se_StartContentModerationCommand;
500
367
  const se_StartFaceDetectionCommand = async (input, context) => {
501
- const headers = {
502
- "content-type": "application/x-amz-json-1.1",
503
- "x-amz-target": "RekognitionService.StartFaceDetection",
504
- };
368
+ const headers = sharedHeaders("StartFaceDetection");
505
369
  let body;
506
370
  body = JSON.stringify(se_StartFaceDetectionRequest(input, context));
507
371
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
508
372
  };
509
373
  exports.se_StartFaceDetectionCommand = se_StartFaceDetectionCommand;
510
374
  const se_StartFaceSearchCommand = async (input, context) => {
511
- const headers = {
512
- "content-type": "application/x-amz-json-1.1",
513
- "x-amz-target": "RekognitionService.StartFaceSearch",
514
- };
375
+ const headers = sharedHeaders("StartFaceSearch");
515
376
  let body;
516
377
  body = JSON.stringify(se_StartFaceSearchRequest(input, context));
517
378
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
518
379
  };
519
380
  exports.se_StartFaceSearchCommand = se_StartFaceSearchCommand;
520
381
  const se_StartLabelDetectionCommand = async (input, context) => {
521
- const headers = {
522
- "content-type": "application/x-amz-json-1.1",
523
- "x-amz-target": "RekognitionService.StartLabelDetection",
524
- };
382
+ const headers = sharedHeaders("StartLabelDetection");
525
383
  let body;
526
384
  body = JSON.stringify(se_StartLabelDetectionRequest(input, context));
527
385
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
528
386
  };
529
387
  exports.se_StartLabelDetectionCommand = se_StartLabelDetectionCommand;
530
388
  const se_StartPersonTrackingCommand = async (input, context) => {
531
- const headers = {
532
- "content-type": "application/x-amz-json-1.1",
533
- "x-amz-target": "RekognitionService.StartPersonTracking",
534
- };
389
+ const headers = sharedHeaders("StartPersonTracking");
535
390
  let body;
536
391
  body = JSON.stringify(se_StartPersonTrackingRequest(input, context));
537
392
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
538
393
  };
539
394
  exports.se_StartPersonTrackingCommand = se_StartPersonTrackingCommand;
540
395
  const se_StartProjectVersionCommand = async (input, context) => {
541
- const headers = {
542
- "content-type": "application/x-amz-json-1.1",
543
- "x-amz-target": "RekognitionService.StartProjectVersion",
544
- };
396
+ const headers = sharedHeaders("StartProjectVersion");
545
397
  let body;
546
398
  body = JSON.stringify(se_StartProjectVersionRequest(input, context));
547
399
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
548
400
  };
549
401
  exports.se_StartProjectVersionCommand = se_StartProjectVersionCommand;
550
402
  const se_StartSegmentDetectionCommand = async (input, context) => {
551
- const headers = {
552
- "content-type": "application/x-amz-json-1.1",
553
- "x-amz-target": "RekognitionService.StartSegmentDetection",
554
- };
403
+ const headers = sharedHeaders("StartSegmentDetection");
555
404
  let body;
556
405
  body = JSON.stringify(se_StartSegmentDetectionRequest(input, context));
557
406
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
558
407
  };
559
408
  exports.se_StartSegmentDetectionCommand = se_StartSegmentDetectionCommand;
560
409
  const se_StartStreamProcessorCommand = async (input, context) => {
561
- const headers = {
562
- "content-type": "application/x-amz-json-1.1",
563
- "x-amz-target": "RekognitionService.StartStreamProcessor",
564
- };
410
+ const headers = sharedHeaders("StartStreamProcessor");
565
411
  let body;
566
412
  body = JSON.stringify(se_StartStreamProcessorRequest(input, context));
567
413
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
568
414
  };
569
415
  exports.se_StartStreamProcessorCommand = se_StartStreamProcessorCommand;
570
416
  const se_StartTextDetectionCommand = async (input, context) => {
571
- const headers = {
572
- "content-type": "application/x-amz-json-1.1",
573
- "x-amz-target": "RekognitionService.StartTextDetection",
574
- };
417
+ const headers = sharedHeaders("StartTextDetection");
575
418
  let body;
576
419
  body = JSON.stringify(se_StartTextDetectionRequest(input, context));
577
420
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
578
421
  };
579
422
  exports.se_StartTextDetectionCommand = se_StartTextDetectionCommand;
580
423
  const se_StopProjectVersionCommand = async (input, context) => {
581
- const headers = {
582
- "content-type": "application/x-amz-json-1.1",
583
- "x-amz-target": "RekognitionService.StopProjectVersion",
584
- };
424
+ const headers = sharedHeaders("StopProjectVersion");
585
425
  let body;
586
426
  body = JSON.stringify(se_StopProjectVersionRequest(input, context));
587
427
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
588
428
  };
589
429
  exports.se_StopProjectVersionCommand = se_StopProjectVersionCommand;
590
430
  const se_StopStreamProcessorCommand = async (input, context) => {
591
- const headers = {
592
- "content-type": "application/x-amz-json-1.1",
593
- "x-amz-target": "RekognitionService.StopStreamProcessor",
594
- };
431
+ const headers = sharedHeaders("StopStreamProcessor");
595
432
  let body;
596
433
  body = JSON.stringify(se_StopStreamProcessorRequest(input, context));
597
434
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
598
435
  };
599
436
  exports.se_StopStreamProcessorCommand = se_StopStreamProcessorCommand;
600
437
  const se_TagResourceCommand = async (input, context) => {
601
- const headers = {
602
- "content-type": "application/x-amz-json-1.1",
603
- "x-amz-target": "RekognitionService.TagResource",
604
- };
438
+ const headers = sharedHeaders("TagResource");
605
439
  let body;
606
440
  body = JSON.stringify(se_TagResourceRequest(input, context));
607
441
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
608
442
  };
609
443
  exports.se_TagResourceCommand = se_TagResourceCommand;
610
444
  const se_UntagResourceCommand = async (input, context) => {
611
- const headers = {
612
- "content-type": "application/x-amz-json-1.1",
613
- "x-amz-target": "RekognitionService.UntagResource",
614
- };
445
+ const headers = sharedHeaders("UntagResource");
615
446
  let body;
616
447
  body = JSON.stringify(se_UntagResourceRequest(input, context));
617
448
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
618
449
  };
619
450
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
620
451
  const se_UpdateDatasetEntriesCommand = async (input, context) => {
621
- const headers = {
622
- "content-type": "application/x-amz-json-1.1",
623
- "x-amz-target": "RekognitionService.UpdateDatasetEntries",
624
- };
452
+ const headers = sharedHeaders("UpdateDatasetEntries");
625
453
  let body;
626
454
  body = JSON.stringify(se_UpdateDatasetEntriesRequest(input, context));
627
455
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
628
456
  };
629
457
  exports.se_UpdateDatasetEntriesCommand = se_UpdateDatasetEntriesCommand;
630
458
  const se_UpdateStreamProcessorCommand = async (input, context) => {
631
- const headers = {
632
- "content-type": "application/x-amz-json-1.1",
633
- "x-amz-target": "RekognitionService.UpdateStreamProcessor",
634
- };
459
+ const headers = sharedHeaders("UpdateStreamProcessor");
635
460
  let body;
636
461
  body = JSON.stringify(se_UpdateStreamProcessorRequest(input, context));
637
462
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -860,6 +685,52 @@ const de_CreateDatasetCommandError = async (output, context) => {
860
685
  });
861
686
  }
862
687
  };
688
+ const de_CreateFaceLivenessSessionCommand = async (output, context) => {
689
+ if (output.statusCode >= 300) {
690
+ return de_CreateFaceLivenessSessionCommandError(output, context);
691
+ }
692
+ const data = await parseBody(output.body, context);
693
+ let contents = {};
694
+ contents = de_CreateFaceLivenessSessionResponse(data, context);
695
+ const response = {
696
+ $metadata: deserializeMetadata(output),
697
+ ...contents,
698
+ };
699
+ return Promise.resolve(response);
700
+ };
701
+ exports.de_CreateFaceLivenessSessionCommand = de_CreateFaceLivenessSessionCommand;
702
+ const de_CreateFaceLivenessSessionCommandError = async (output, context) => {
703
+ const parsedOutput = {
704
+ ...output,
705
+ body: await parseErrorBody(output.body, context),
706
+ };
707
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
708
+ switch (errorCode) {
709
+ case "AccessDeniedException":
710
+ case "com.amazonaws.rekognition#AccessDeniedException":
711
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
712
+ case "InternalServerError":
713
+ case "com.amazonaws.rekognition#InternalServerError":
714
+ throw await de_InternalServerErrorRes(parsedOutput, context);
715
+ case "InvalidParameterException":
716
+ case "com.amazonaws.rekognition#InvalidParameterException":
717
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
718
+ case "ProvisionedThroughputExceededException":
719
+ case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
720
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
721
+ case "ThrottlingException":
722
+ case "com.amazonaws.rekognition#ThrottlingException":
723
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
724
+ default:
725
+ const parsedBody = parsedOutput.body;
726
+ (0, smithy_client_1.throwDefaultError)({
727
+ output,
728
+ parsedBody,
729
+ exceptionCtor: RekognitionServiceException_1.RekognitionServiceException,
730
+ errorCode,
731
+ });
732
+ }
733
+ };
863
734
  const de_CreateProjectCommand = async (output, context) => {
864
735
  if (output.statusCode >= 300) {
865
736
  return de_CreateProjectCommandError(output, context);
@@ -2233,6 +2104,55 @@ const de_GetFaceDetectionCommandError = async (output, context) => {
2233
2104
  });
2234
2105
  }
2235
2106
  };
2107
+ const de_GetFaceLivenessSessionResultsCommand = async (output, context) => {
2108
+ if (output.statusCode >= 300) {
2109
+ return de_GetFaceLivenessSessionResultsCommandError(output, context);
2110
+ }
2111
+ const data = await parseBody(output.body, context);
2112
+ let contents = {};
2113
+ contents = de_GetFaceLivenessSessionResultsResponse(data, context);
2114
+ const response = {
2115
+ $metadata: deserializeMetadata(output),
2116
+ ...contents,
2117
+ };
2118
+ return Promise.resolve(response);
2119
+ };
2120
+ exports.de_GetFaceLivenessSessionResultsCommand = de_GetFaceLivenessSessionResultsCommand;
2121
+ const de_GetFaceLivenessSessionResultsCommandError = async (output, context) => {
2122
+ const parsedOutput = {
2123
+ ...output,
2124
+ body: await parseErrorBody(output.body, context),
2125
+ };
2126
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2127
+ switch (errorCode) {
2128
+ case "AccessDeniedException":
2129
+ case "com.amazonaws.rekognition#AccessDeniedException":
2130
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2131
+ case "InternalServerError":
2132
+ case "com.amazonaws.rekognition#InternalServerError":
2133
+ throw await de_InternalServerErrorRes(parsedOutput, context);
2134
+ case "InvalidParameterException":
2135
+ case "com.amazonaws.rekognition#InvalidParameterException":
2136
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2137
+ case "ProvisionedThroughputExceededException":
2138
+ case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2139
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2140
+ case "SessionNotFoundException":
2141
+ case "com.amazonaws.rekognition#SessionNotFoundException":
2142
+ throw await de_SessionNotFoundExceptionRes(parsedOutput, context);
2143
+ case "ThrottlingException":
2144
+ case "com.amazonaws.rekognition#ThrottlingException":
2145
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2146
+ default:
2147
+ const parsedBody = parsedOutput.body;
2148
+ (0, smithy_client_1.throwDefaultError)({
2149
+ output,
2150
+ parsedBody,
2151
+ exceptionCtor: RekognitionServiceException_1.RekognitionServiceException,
2152
+ errorCode,
2153
+ });
2154
+ }
2155
+ };
2236
2156
  const de_GetFaceSearchCommand = async (output, context) => {
2237
2157
  if (output.statusCode >= 300) {
2238
2158
  return de_GetFaceSearchCommandError(output, context);
@@ -4017,6 +3937,9 @@ const de_UpdateStreamProcessorCommandError = async (output, context) => {
4017
3937
  case "ProvisionedThroughputExceededException":
4018
3938
  case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4019
3939
  throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3940
+ case "ResourceInUseException":
3941
+ case "com.amazonaws.rekognition#ResourceInUseException":
3942
+ throw await de_ResourceInUseExceptionRes(parsedOutput, context);
4020
3943
  case "ResourceNotFoundException":
4021
3944
  case "com.amazonaws.rekognition#ResourceNotFoundException":
4022
3945
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
@@ -4195,6 +4118,15 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
4195
4118
  });
4196
4119
  return (0, smithy_client_1.decorateServiceException)(exception, body);
4197
4120
  };
4121
+ const de_SessionNotFoundExceptionRes = async (parsedOutput, context) => {
4122
+ const body = parsedOutput.body;
4123
+ const deserialized = de_SessionNotFoundException(body, context);
4124
+ const exception = new models_0_1.SessionNotFoundException({
4125
+ $metadata: deserializeMetadata(parsedOutput),
4126
+ ...deserialized,
4127
+ });
4128
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
4129
+ };
4198
4130
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
4199
4131
  const body = parsedOutput.body;
4200
4132
  const deserialized = de_ThrottlingException(body, context);
@@ -4308,6 +4240,19 @@ const se_CreateDatasetRequest = (input, context) => {
4308
4240
  ...(input.ProjectArn != null && { ProjectArn: input.ProjectArn }),
4309
4241
  };
4310
4242
  };
4243
+ const se_CreateFaceLivenessSessionRequest = (input, context) => {
4244
+ return {
4245
+ ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
4246
+ ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
4247
+ ...(input.Settings != null && { Settings: se_CreateFaceLivenessSessionRequestSettings(input.Settings, context) }),
4248
+ };
4249
+ };
4250
+ const se_CreateFaceLivenessSessionRequestSettings = (input, context) => {
4251
+ return {
4252
+ ...(input.AuditImagesLimit != null && { AuditImagesLimit: input.AuditImagesLimit }),
4253
+ ...(input.OutputConfig != null && { OutputConfig: se_LivenessOutputConfig(input.OutputConfig, context) }),
4254
+ };
4255
+ };
4311
4256
  const se_CreateProjectRequest = (input, context) => {
4312
4257
  return {
4313
4258
  ...(input.ProjectName != null && { ProjectName: input.ProjectName }),
@@ -4592,6 +4537,11 @@ const se_GetFaceDetectionRequest = (input, context) => {
4592
4537
  ...(input.NextToken != null && { NextToken: input.NextToken }),
4593
4538
  };
4594
4539
  };
4540
+ const se_GetFaceLivenessSessionResultsRequest = (input, context) => {
4541
+ return {
4542
+ ...(input.SessionId != null && { SessionId: input.SessionId }),
4543
+ };
4544
+ };
4595
4545
  const se_GetFaceSearchRequest = (input, context) => {
4596
4546
  return {
4597
4547
  ...(input.JobId != null && { JobId: input.JobId }),
@@ -4745,6 +4695,12 @@ const se_ListTagsForResourceRequest = (input, context) => {
4745
4695
  ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
4746
4696
  };
4747
4697
  };
4698
+ const se_LivenessOutputConfig = (input, context) => {
4699
+ return {
4700
+ ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
4701
+ ...(input.S3KeyPrefix != null && { S3KeyPrefix: input.S3KeyPrefix }),
4702
+ };
4703
+ };
4748
4704
  const se_NotificationChannel = (input, context) => {
4749
4705
  return {
4750
4706
  ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
@@ -5177,6 +5133,24 @@ const de_AudioMetadataList = (output, context) => {
5177
5133
  });
5178
5134
  return retVal;
5179
5135
  };
5136
+ const de_AuditImage = (output, context) => {
5137
+ return {
5138
+ BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined,
5139
+ Bytes: output.Bytes != null ? context.base64Decoder(output.Bytes) : undefined,
5140
+ S3Object: output.S3Object != null ? de_S3Object(output.S3Object, context) : undefined,
5141
+ };
5142
+ };
5143
+ const de_AuditImages = (output, context) => {
5144
+ const retVal = (output || [])
5145
+ .filter((e) => e != null)
5146
+ .map((entry) => {
5147
+ if (entry === null) {
5148
+ return null;
5149
+ }
5150
+ return de_AuditImage(entry, context);
5151
+ });
5152
+ return retVal;
5153
+ };
5180
5154
  const de_Beard = (output, context) => {
5181
5155
  return {
5182
5156
  Confidence: (0, smithy_client_1.limitedParseFloat32)(output.Confidence),
@@ -5384,6 +5358,11 @@ const de_CreateDatasetResponse = (output, context) => {
5384
5358
  DatasetArn: (0, smithy_client_1.expectString)(output.DatasetArn),
5385
5359
  };
5386
5360
  };
5361
+ const de_CreateFaceLivenessSessionResponse = (output, context) => {
5362
+ return {
5363
+ SessionId: (0, smithy_client_1.expectString)(output.SessionId),
5364
+ };
5365
+ };
5387
5366
  const de_CreateProjectResponse = (output, context) => {
5388
5367
  return {
5389
5368
  ProjectArn: (0, smithy_client_1.expectString)(output.ProjectArn),
@@ -5904,6 +5883,15 @@ const de_GetFaceDetectionResponse = (output, context) => {
5904
5883
  VideoMetadata: output.VideoMetadata != null ? de_VideoMetadata(output.VideoMetadata, context) : undefined,
5905
5884
  };
5906
5885
  };
5886
+ const de_GetFaceLivenessSessionResultsResponse = (output, context) => {
5887
+ return {
5888
+ AuditImages: output.AuditImages != null ? de_AuditImages(output.AuditImages, context) : undefined,
5889
+ Confidence: (0, smithy_client_1.limitedParseFloat32)(output.Confidence),
5890
+ ReferenceImage: output.ReferenceImage != null ? de_AuditImage(output.ReferenceImage, context) : undefined,
5891
+ SessionId: (0, smithy_client_1.expectString)(output.SessionId),
5892
+ Status: (0, smithy_client_1.expectString)(output.Status),
5893
+ };
5894
+ };
5907
5895
  const de_GetFaceSearchResponse = (output, context) => {
5908
5896
  return {
5909
5897
  JobStatus: (0, smithy_client_1.expectString)(output.JobStatus),
@@ -6645,6 +6633,13 @@ const de_ServiceQuotaExceededException = (output, context) => {
6645
6633
  Message: (0, smithy_client_1.expectString)(output.Message),
6646
6634
  };
6647
6635
  };
6636
+ const de_SessionNotFoundException = (output, context) => {
6637
+ return {
6638
+ Code: (0, smithy_client_1.expectString)(output.Code),
6639
+ Logref: (0, smithy_client_1.expectString)(output.Logref),
6640
+ Message: (0, smithy_client_1.expectString)(output.Message),
6641
+ };
6642
+ };
6648
6643
  const de_ShotSegment = (output, context) => {
6649
6644
  return {
6650
6645
  Confidence: (0, smithy_client_1.limitedParseFloat32)(output.Confidence),
@@ -6960,6 +6955,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
6960
6955
  }
6961
6956
  return new protocol_http_1.HttpRequest(contents);
6962
6957
  };
6958
+ function sharedHeaders(operation) {
6959
+ return {
6960
+ "content-type": "application/x-amz-json-1.1",
6961
+ "x-amz-target": `RekognitionService.${operation}`,
6962
+ };
6963
+ }
6963
6964
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
6964
6965
  if (encoded.length) {
6965
6966
  return JSON.parse(encoded);